From 3426f4a8f4af9fb12dd4d81533563d8956e912dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Tue, 30 Jan 2024 23:50:28 +0100 Subject: [PATCH] More script fixes (#2419) Task/Issue URL: https://app.asana.com/0/1203301625297703/1206468110851824/f Description: - set initial build number to -1 since we always increment it, - set version only for hotfix branch, otherwise we get it from the user input --- fastlane/Fastfile | 2 +- scripts/prepare_release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 061eb92d21..751b5b0df9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -148,7 +148,7 @@ lane :latest_build_number_for_version do |options| build_number = latest_testflight_build_number( api_key: get_api_key, version: options[:version], - initial_build_number: 0, + initial_build_number: -1, username: get_username(options)) if options[:file_name] File.write(options[:file_name], build_number) diff --git a/scripts/prepare_release.sh b/scripts/prepare_release.sh index 3909a5e23f..4a5bde66d3 100755 --- a/scripts/prepare_release.sh +++ b/scripts/prepare_release.sh @@ -171,8 +171,8 @@ create_build_branch() { update_marketing_version() { printf '%s' "Setting app version ... " - version=$(cut -d' ' -f3 < "${base_dir}/Configuration/Version.xcconfig") if [[ $is_hotfix ]]; then + version=$(cut -d' ' -f3 < "${base_dir}/Configuration/Version.xcconfig") version=$(bump_patch_number "$version") fi