lib/sigh/runner.rb in sigh-1.10.4 vs lib/sigh/runner.rb in sigh-1.11.0

- old
+ new

@@ -83,10 +83,24 @@ elsif (filtered || []).count > 0 results = filtered end end + # Since September 20, 2016 spaceship doesn't distinguish between AdHoc and AppStore profiles + # any more, since it requires an additional request + # Instead we only call is_adhoc? on the matching profiles to speed up spaceship + + results = results.find_all do |current_profile| + if profile_type == Spaceship.provisioning_profile.ad_hoc + current_profile.is_adhoc? + elsif profile_type == Spaceship.provisioning_profile.app_store + !current_profile.is_adhoc? + else + true + end + end + return results if Sigh.config[:skip_certificate_verification] return results.find_all do |a| # Also make sure we have the certificate installed on the local machine installed = false @@ -95,14 +109,14 @@ file.write(cert.download_raw) file.close if FastlaneCore::CertChecker.installed?(file.path) installed = true else - UI.important("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}, skipping this one...") + UI.message("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}, skipping this one...") end end - installed + installed && a.certificate_valid? end end # Create a new profile and return it def create_profile! @@ -159,10 +173,10 @@ if certificates.count > 1 and !Sigh.config[:development] UI.important "Found more than one code signing identity. Choosing the first one. Check out `sigh --help` to see all available options." UI.important "Available Code Signing Identities for current filters:" certificates.each do |c| - str = ["\t- Name:", c.owner_name, "- ID:", c.id + "- Expires", c.expires.strftime("%d/%m/%Y")].join(" ") + str = ["\t- Name:", c.owner_name, "- ID:", c.id + " - Expires", c.expires.strftime("%d/%m/%Y")].join(" ") UI.message str.green end end if certificates.count == 0