From 2de1e0178c22a8a1af18d80182cf6156b0bb1939 Mon Sep 17 00:00:00 2001 From: Ian Guedes Maia Date: Mon, 6 Feb 2023 19:20:47 +0100 Subject: [PATCH 1/2] Deprecate `Deliverfile` in favor of `Fastfile` --- fastlane/Deliverfile | 36 ----------------------- fastlane/Fastfile | 26 ++++++++++++++++ fastlane/metadata/copyright.txt | 1 + fastlane/metadata/default/privacy_url.txt | 1 + 4 files changed, 28 insertions(+), 36 deletions(-) delete mode 100644 fastlane/Deliverfile create mode 100644 fastlane/metadata/copyright.txt create mode 100644 fastlane/metadata/default/privacy_url.txt diff --git a/fastlane/Deliverfile b/fastlane/Deliverfile deleted file mode 100644 index f0987efad..000000000 --- a/fastlane/Deliverfile +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal:true - -# The Deliverfile allows you to store various App Store Connect metadata -# For more information, check out the docs -# https://docs.fastlane.tools/actions/deliver/ - -######################################## -# App Metadata -######################################## - -# This folder has to include one folder for each language -screenshots_path './screenshots/' -app_identifier 'com.automattic.SimplenoteMac' - -# Make sure to update these keys for a new version -app_version "2.17" - -privacy_url( - 'default' => 'https://simplenote.com/privacy/' -) - -copyright('2021 Automattic') - -skip_binary_upload true -overwrite_screenshots true -phased_release true - -# We are using the API key to upload the metadata to ASC via Deliver, but, as -# the tool reports: -# -# > [!] Precheck cannot check In-app purchases with the App Store Connect API -# > Key (yet). Exclude In-app purchases from precheck, disable the precheck step -# > in your build step, or use Apple ID login -# -# Simplenote iOS doesn't use IAPs, for the moment, so we can safely skip them. -precheck_include_in_app_purchases false diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 35f582ae1..b51f75166 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -25,6 +25,7 @@ INTERNAL_SCHEME = 'Simplenote' APP_STORE_SCHEME = 'Simplenote-AppStore' BUILD_FOLDER = 'build' APP_STORE_CONNECT_API_KEY_PATH = File.join(Dir.home, '.configure', 'simplenote-macos', 'secrets', 'app_store_connect_fastlane_api_key.json') +APP_STORE_BUNDLE_IDENTIFIER = 'com.automattic.SimplenoteMac' # On CI, it's useful to skip code signing unless necessary to avoid spending # time syncing the certificates and profiles with match. And while not @@ -366,6 +367,31 @@ end end end + # Upload the localized metadata (from `fastlane/metadata/`) to App Store Connect + # + # @option [Boolean] with_screenshots (default: false) If true, will also upload the latest screenshot files to ASC + # + desc 'Upload the localized metadata to App Store Connect, optionally including screenshots.' + lane :update_metadata_on_app_store_connect do |options| + # Skip screenshots by default. The naming is "with" to make it clear that + # callers need to opt-in to adding screenshots. The naming of the deliver + # (upload_to_app_store) parameter, on the other hand, uses the skip verb. + with_screenshots = options.fetch(:with_screenshots, false) + skip_screenshots = !with_screenshots + + upload_to_app_store( + app_identifier: APP_STORE_BUNDLE_IDENTIFIER, + app_version: ios_get_app_version, + skip_binary_upload: true, + screenshots_path: './screenshots/', + skip_screenshots: skip_screenshots, + overwrite_screenshots: true, # won't have effect if `skip_screenshots` is true + phased_release: true, + precheck_include_in_app_purchases: false, + api_key_path: APP_STORE_CONNECT_API_KEY_PATH + ) + end + # Temporary lane to automate the process of uploading the .app manually # exported after archiving the Simplenote scheme from Xcode. # diff --git a/fastlane/metadata/copyright.txt b/fastlane/metadata/copyright.txt new file mode 100644 index 000000000..c3ba849d7 --- /dev/null +++ b/fastlane/metadata/copyright.txt @@ -0,0 +1 @@ +2023 Automattic diff --git a/fastlane/metadata/default/privacy_url.txt b/fastlane/metadata/default/privacy_url.txt new file mode 100644 index 000000000..6e2284afd --- /dev/null +++ b/fastlane/metadata/default/privacy_url.txt @@ -0,0 +1 @@ +https://simplenote.com/privacy/ From 52e90be5598e4c157e22d059808d367242effa4e Mon Sep 17 00:00:00 2001 From: Ian Guedes Maia Date: Fri, 10 Feb 2023 19:33:51 +0100 Subject: [PATCH 2/2] Update the bump version call to reflect that we no longer use the Deliverfile --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b51f75166..bd681e844 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -120,7 +120,7 @@ end lane :code_freeze do | options | old_version = ios_codefreeze_prechecks(options) - ios_bump_version_release() + ios_bump_version_release(skip_deliver: true) new_version = ios_get_app_version() ios_update_release_notes(new_version: new_version) setbranchprotection(repository:GHHELPER_REPO, branch: "release/#{new_version}")