sigh/lib/sigh/runner.rb in fastlane-2.19.3 vs sigh/lib/sigh/runner.rb in fastlane-2.20.0.beta.20170302010029

- old
+ new

@@ -95,41 +95,23 @@ end end return results if Sigh.config[:skip_certificate_verification] - UI.message "Verifying certificates..." - return results.find_all do |current_profile| + return results.find_all do |a| + # Also make sure we have the certificate installed on the local machine installed = false - - # Attempts to download all certificats from this profile - # for checking if they are installed. - # `cert.download_raw` can fail if the user is a - # "member" and not an a "admin" - raw_certs = current_profile.certificates.map do |cert| - begin - raw_cert = cert.download_raw - rescue => error - UI.important("Cannot download cert #{cert.id} - #{error.message}") - raw_cert = nil - end - { downloaded: raw_cert, cert: cert } - end - - # Makes sure we have the certificate installed on the local machine - raw_certs.each do |current_cert| - # Skip certificates that failed to download - next unless current_cert[:downloaded] + a.certificates.each do |cert| file = Tempfile.new('cert') - file.write(current_cert[:downloaded]) + file.write(cert.download_raw) file.close if FastlaneCore::CertChecker.installed?(file.path) installed = true else - UI.message("Certificate for Provisioning Profile '#{current_profile.name}' not available locally: #{current_cert[:cert].id}, skipping this one...") + UI.message("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}, skipping this one...") end end - installed && current_profile.certificate_valid? + installed && a.certificate_valid? end end # Create a new profile and return it def create_profile!