From 7dfb2c9a08d43adb55c7d60938e1df9ee23b6625 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Tue, 19 Sep 2023 20:23:12 +0200 Subject: [PATCH] Cancel previous App Store submission when deploy to App Store Connect --- .../lib/src/common/src/app_store_connect_utils.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/sz_repo_cli/lib/src/common/src/app_store_connect_utils.dart b/tools/sz_repo_cli/lib/src/common/src/app_store_connect_utils.dart index 38f2e3fbd..efff14401 100644 --- a/tools/sz_repo_cli/lib/src/common/src/app_store_connect_utils.dart +++ b/tools/sz_repo_cli/lib/src/common/src/app_store_connect_utils.dart @@ -185,6 +185,13 @@ Future publishToAppStoreConnect({ // See: https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/app-store-connect/publish.md#--max-build-processing-wait--wmax_build_processing_wait '--max-build-processing-wait', '60', + // Cancels previous submissions for the application in App Store Connect + // before creating a new submission if the submissions are in a state + // where it is possible. + // + // We use this option because otherwise the deployment will fail if the + // previous submission is not approved yet. + '--cancel-previous-submissions' ], workingDirectory: repo.sharezoneFlutterApp.location.path, );