From ad099aa9c9c8aef47121213e3cea063531242aa9 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Thu, 11 Jun 2020 10:49:12 +0300 Subject: [PATCH] remove private lane syncCodeSigning, use public SyncCodeSigning instead --- xcode/commonFastfile | 54 ++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index ec84766..673a17b 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -111,11 +111,7 @@ private_lane :buildConfiguration do |options| options[:xcconfig_name] = lane_name configuration_type = Touchlane::ConfigurationType.from_lane_name(lane_name) - configuration = get_configuration_for_type(configuration_type.type) - - options = configuration.to_options - .merge(get_keychain_options(options)) - .merge(options) + options = fill_up_options_using_configuration_type(options, configuration_type) openKeychain(options) @@ -209,23 +205,11 @@ lane :createPushCertificate do |options| ) end -lane :syncCodeSigning do |options| - match( - app_identifier: options[:app_identifier], - username: options[:username] || options[:apple_id], - team_id: options[:team_id], - type: options[:type], - readonly: options[:readonly].nil? ? true : options[:readonly], - storage_mode: "git", - git_url: options[:git_url], - git_branch: "fastlane_certificates", - shallow_clone: true, - clone_branch_directly: true, - keychain_name: options[:keychain_name], - keychain_password: options[:keychain_password], - skip_docs: true, - platform: "ios" - ) +lane :SyncCodeSigning do |options| + configuration_type = Touchlane::ConfigurationType.from_type(options[:type]) + options = fill_up_options_using_configuration_type(options, configuration_type) + + sync_code_signing_using_options(options) end lane :SyncSymbols do |options| @@ -349,6 +333,32 @@ lane :ManuallyUpdateCodeSigning do |options| end +def sync_code_signing_using_options(options) + match( + app_identifier: options[:app_identifier], + username: options[:username] || options[:apple_id], + team_id: options[:team_id], + type: options[:type], + readonly: options[:readonly].nil? ? true : options[:readonly], + storage_mode: "git", + git_url: options[:git_url], + git_branch: "fastlane_certificates", + shallow_clone: true, + clone_branch_directly: true, + keychain_name: options[:keychain_name], + keychain_password: options[:keychain_password], + skip_docs: true, + platform: "ios" + ) +end + +def fill_up_options_using_configuration_type(options, configuration_type) + configuration = get_configuration_for_type(configuration_type.type) + + configuration.to_options + .merge(get_keychain_options(options)) + .merge(options) +end def get_keychain_options(options) keychain_name = options[:keychain_name]