From 97d8f0edcf7ad82f0bfc3736cd5777763dd27df4 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Thu, 21 Feb 2019 14:20:36 +0300 Subject: [PATCH] split syncCodeSigning to getCodeSigning & updateCodeSigning --- xcode/commonFastfile | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 82d8abe..5a4bdd3 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -90,21 +90,32 @@ private_lane :createPushCertificate do |options| ) end -private_lane :syncCodeSignning do |options| +private_lane :syncCodeSigning do |options| + match( + app_identifier: options[:app_identifier], + type: "development", + readonly: options[:readonly] || true, + storage_mode: "git", + git_url: options[:git_url], + git_branch: "fastlane_certificates", + keychain_password: options[:keychain_password], + skip_docs: true, + platform: "ios" + ) +end + +private_lane :getCodeSigning do |options| keychain_password = prompt( text: "Please enter your keychain password (account password): ", secure_text: true ) - match( - app_identifier: options[:app_identifier], - type: "development", - readonly: true, - storage_mode: "git", - git_url: options[:git_url], - git_branch: "fastlane_certificates", - keychain_password: keychain_password, - skip_docs: true, - platform: "ios" - ) + options[:readonly] = true + options[:keychain_password] = keychain_password + syncCodeSigning(options) +end + +private_lane :updateCodeSigning do |options| + options[:readonly] = false + syncCodeSigning(options) end