24 lines
774 B
Ruby
24 lines
774 B
Ruby
def replace_development_certificate(options)
|
|
register_local_storage_for_match()
|
|
|
|
certs_path_tmp_dir = Dir.mktmpdir
|
|
|
|
cert(
|
|
development: true,
|
|
username: options[:username] || options[:apple_id],
|
|
api_key_path: options[:api_key_path],
|
|
api_key: options[:api_key],
|
|
team_id: options[:team_id],
|
|
output_path: certs_path_tmp_dir,
|
|
keychain_password: options[:keychain_password]
|
|
)
|
|
|
|
options[:cert_id] = lane_context[Fastlane::Actions::SharedValues::CERT_CERTIFICATE_ID]
|
|
options[:cert_path] = lane_context[Fastlane::Actions::SharedValues::CERT_FILE_PATH]
|
|
options[:p12_path] = File.join(File.dirname(options[:cert_path]), "#{options[:cert_id]}.p12")
|
|
options[:readonly] = false
|
|
|
|
refresh_profiles(options)
|
|
|
|
sh("open #{certs_path_tmp_dir}")
|
|
end |