From 905fce562d0aa5b9f37b9c575aa98273710ad007 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 22 Jun 2023 18:04:33 -0700 Subject: [PATCH 1/3] Release pending versions before submitting a new version for review --- fastlane/Fastfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 60d60934c2ba..80d1fa5ee6a7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -243,6 +243,25 @@ platform :ios do desc "Move app to App Store Review" lane :production do + # Login to Spaceship + fastlane_require 'spaceship' + teamID = "368M544MTT" + Spaceship::ConnectAPI.login( + use_portal: false, + tunes_team_id: teamID, + ) + + # Find our app + app = Spaceship::ConnectAPI::App.find("com.chat.expensify.chat") + if app.nil? + UI.important "not found in team #{teamID} on ASC!" + next + end + + # If there's an app that's Pending Developer Release, release it before continuing with the new version + pendingReviewVersion = app.get_pending_release_app_store_version + version.create_app_store_version_release_request unless version.nil? + deliver( api_key_path: "./ios/ios-fastlane-json-key.json", From 48125e26ad0b6badffcc672c6466600217a8f622 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 22 Jun 2023 18:10:04 -0700 Subject: [PATCH 2/3] Add code in null safety check --- fastlane/Fastfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 80d1fa5ee6a7..994a6d7d9bfd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -256,12 +256,12 @@ platform :ios do if app.nil? UI.important "not found in team #{teamID} on ASC!" next + else + # If there's an app that's Pending Developer Release, release it before continuing with the new version + pendingReviewVersion = app.get_pending_release_app_store_version + version.create_app_store_version_release_request unless version.nil? end - # If there's an app that's Pending Developer Release, release it before continuing with the new version - pendingReviewVersion = app.get_pending_release_app_store_version - version.create_app_store_version_release_request unless version.nil? - deliver( api_key_path: "./ios/ios-fastlane-json-key.json", From cddb10343f07497d301c4e9ae2b27d976b3652f5 Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 12:51:45 -0700 Subject: [PATCH 3/3] Read config values from Appfile --- fastlane/Fastfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 994a6d7d9bfd..aba3430d9f72 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -245,14 +245,15 @@ platform :ios do lane :production do # Login to Spaceship fastlane_require 'spaceship' - teamID = "368M544MTT" + teamID = CredentialsManager::AppfileConfig.try_fetch_value(:team_id) Spaceship::ConnectAPI.login( use_portal: false, tunes_team_id: teamID, ) # Find our app - app = Spaceship::ConnectAPI::App.find("com.chat.expensify.chat") + bundleID = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + app = Spaceship::ConnectAPI::App.find(bundleID) if app.nil? UI.important "not found in team #{teamID} on ASC!" next