match/lib/match/generator.rb in fastlane-2.140.0 vs match/lib/match/generator.rb in fastlane-2.141.0
- old
+ new
@@ -1,18 +1,24 @@
require_relative 'module'
module Match
# Generate missing resources
class Generator
- def self.generate_certificate(params, cert_type, working_directory)
+ def self.generate_certificate(params, cert_type, working_directory, specific_cert_type: nil)
require 'cert/runner'
require 'cert/options'
output_path = File.join(working_directory, "certs", cert_type.to_s)
+ # Mapping match option to cert option for "Developer ID Application"
+ if cert_type.to_sym == :developer_id_application
+ specific_cert_type = cert_type.to_s
+ end
+
arguments = FastlaneCore::Configuration.create(Cert::Options.available_options, {
development: params[:type] == "development",
+ type: specific_cert_type,
generate_apple_certs: params[:generate_apple_certs],
output_path: output_path,
force: true, # we don't need a certificate without its private key, we only care about a new certificate
username: params[:username],
team_id: params[:team_id],
@@ -68,21 +74,29 @@
team_name: params[:team_name],
template_name: params[:template_name]
}
values[:platform] = params[:platform]
- values[:adhoc] = true if prov_type == :adhoc
- values[:development] = true if prov_type == :development
+ # These options are all conflicting so can only set one
+ if params[:type] == "developer_id"
+ values[:developer_id] = true
+ elsif prov_type == :adhoc
+ values[:adhoc] = true
+ elsif prov_type == :development
+ values[:development] = true
+ end
+
arguments = FastlaneCore::Configuration.create(Sigh::Options.available_options, values)
Sigh.config = arguments
path = Sigh::Manager.start
return path
end
# @return the name of the provisioning profile type
def self.profile_type_name(type)
+ return "Direct" if type == :developer_id
return "Development" if type == :development
return "AdHoc" if type == :adhoc
return "AppStore" if type == :appstore
return "InHouse" if type == :enterprise
return "Unknown"