match/lib/match/generator.rb in fastlane-2.105.2 vs match/lib/match/generator.rb in fastlane-2.106.0

- old
+ new

@@ -1,15 +1,15 @@ require_relative 'module' module Match # Generate missing resources class Generator - def self.generate_certificate(params, cert_type) + def self.generate_certificate(params, cert_type, working_directory) require 'cert/runner' require 'cert/options' - output_path = File.join(params[:workspace], "certs", cert_type.to_s) + output_path = File.join(working_directory, "certs", cert_type.to_s) arguments = FastlaneCore::Configuration.create(Cert::Options.available_options, { development: params[:type] == "development", output_path: output_path, force: true, # we don't need a certificate without its private key, we only care about a new certificate @@ -30,19 +30,19 @@ raise ex end end # We don't care about the signing request - Dir[File.join(params[:workspace], "**", "*.certSigningRequest")].each { |path| File.delete(path) } + Dir[File.join(working_directory, "**", "*.certSigningRequest")].each { |path| File.delete(path) } # we need to return the path # Inside this directory, there is the `.p12` file and the `.cer` file with the same name, but different extension return cert_path end # @return (String) The UUID of the newly generated profile - def self.generate_provisioning_profile(params: nil, prov_type: nil, certificate_id: nil, app_identifier: nil) + def self.generate_provisioning_profile(params: nil, prov_type: nil, certificate_id: nil, app_identifier: nil, working_directory: nil) require 'sigh/manager' require 'sigh/options' prov_type = Match.profile_type_sym(params[:type]) @@ -54,10 +54,10 @@ profile_name = names.join(" ") values = { app_identifier: app_identifier, - output_path: File.join(params[:workspace], "profiles", prov_type.to_s), + output_path: File.join(working_directory, "profiles", prov_type.to_s), username: params[:username], force: true, cert_id: certificate_id, provisioning_name: profile_name, ignore_profiles_with_different_name: true,