lib/sigh/runner.rb in sigh-1.4.1 vs lib/sigh/runner.rb in sigh-1.5.0
- old
+ new
@@ -32,11 +32,11 @@
end
profile = profile.update! # assign it, as it's a new profile
end
else
- UI.important "No existing profiles found, that match the certificates you have installed, creating a new one for you"
+ UI.important "No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you"
ensure_app_exists!
profile = create_profile!
end
UI.user_error!("Something went wrong fetching the latest profile") unless profile
@@ -70,12 +70,12 @@
# Take the provisioning profile name into account
if Sigh.config[:provisioning_name].to_s.length > 0
filtered = results.select { |p| p.name.strip == Sigh.config[:provisioning_name].strip }
if Sigh.config[:ignore_profiles_with_different_name]
results = filtered
- else
- results = filtered if (filtered || []).count > 0
+ elsif (filtered || []).count > 0
+ results = filtered
end
end
return results if Sigh.config[:skip_certificate_verification]
@@ -84,11 +84,15 @@
installed = false
a.certificates.each do |cert|
file = Tempfile.new('cert')
file.write(cert.download_raw)
file.close
- installed = true if FastlaneCore::CertChecker.installed?(file.path)
+ if FastlaneCore::CertChecker.installed?(file.path)
+ installed = true
+ else
+ UI.important("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}")
+ end
end
installed
end
end
@@ -134,10 +138,20 @@
end
true
end
+ unless Sigh.config[:skip_certificate_verification]
+ certificates = certificates.find_all do |c|
+ file = Tempfile.new('cert')
+ file.write(c.download_raw)
+ file.close
+
+ FastlaneCore::CertChecker.installed?(file.path)
+ end
+ end
+
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(" ")
@@ -148,10 +162,10 @@
if certificates.count == 0
filters = ""
filters << "Owner Name: '#{Sigh.config[:cert_owner_name]}' " if Sigh.config[:cert_owner_name]
filters << "Certificate ID: '#{Sigh.config[:cert_id]}' " if Sigh.config[:cert_id]
UI.important "No certificates for filter: #{filters}" if filters.length > 0
- UI.user_error!("Could not find a matching code signing identity for #{profile_type}. You can use cert to generate one (https://github.com/fastlane/fastlane/tree/master/cert)")
+ UI.user_error!("Could not find a matching code signing identity for type '#{profile_type.to_s.split(':').last}'. You can use cert to generate one: \nhttps://github.com/fastlane/fastlane/tree/master/cert")
end
return certificates if Sigh.config[:development] # development profiles support multiple certificates
return certificates.first
end