lib/motion-provisioning/certificate.rb in motion-provisioning-0.0.5 vs lib/motion-provisioning/certificate.rb in motion-provisioning-0.0.6

- old
+ new

@@ -11,13 +11,13 @@ end def certificate_name(type, platform) self.type = type self.platform = platform - self.output_path = File.expand_path('./provisioning') - certificate_path = File.expand_path("./provisioning/#{platform}_#{type}_certificate.cer") - private_key_path = File.expand_path("./provisioning/#{platform}_#{type}_private_key.p12") + self.output_path = MotionProvisioning.output_path + certificate_path = File.join(output_path, "#{platform}_#{type}_certificate.cer") + private_key_path = File.join(output_path, "#{platform}_#{type}_private_key.p12") # First check if there is a certificate and key file, and if it is installed identities = available_identities if File.exist?(certificate_path) && File.exist?(private_key_path) && ENV['recreate_certificate'].nil? fingerprint = sha1_fingerprint(certificate_path) @@ -33,13 +33,10 @@ Utils.log("Info", "Using certificate '#{name}'.") return name end end - # Create the folder to store the certs - FileUtils.mkdir_p(File.expand_path('./provisioning')) - # Make sure a client is created and logged in client # Lets see if any of the user certificates is in the keychain installed_certificate = nil @@ -192,12 +189,12 @@ import_file(private_key_path) import_file(cert_path) Utils.log("Info", "Successfully installed certificate.") if self.type == :distribution - Utils.log("Warning", "You have just created a distribution certificate. These certificates must be shared with other team members by sending them the private key (.p12) and certificate (.cer) files in your /provisioning folder and install them in the keychain.") + Utils.log("Warning", "You have just created a distribution certificate. These certificates must be shared with other team members by sending them the private key (.p12) and certificate (.cer) files in your output folder and install them in the keychain.") else - Utils.log("Warning", "You have just created a development certificate. If you want to use this certificate on another machine, transfer the private key (.p12) and certificate (.cer) files in your /provisioning folder and install them in the keychain.") + Utils.log("Warning", "You have just created a development certificate. If you want to use this certificate on another machine, transfer the private key (.p12) and certificate (.cer) files in your output folder and install them in the keychain.") end Utils.ask("Info", "Press any key to continue...") cert_path end