From a80b4d4ea46672550c39f3a6010c10d4b3a27256 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 9 Nov 2026 12:20:42 +0100 Subject: [PATCH] - change order - phase2: all must be committed Signed-off-by: tobiasKaminsky --- config/fastlane/common.Fastfile | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/config/fastlane/common.Fastfile b/config/fastlane/common.Fastfile index 587310c..e97a057 100644 --- a/config/fastlane/common.Fastfile +++ b/config/fastlane/common.Fastfile @@ -31,6 +31,23 @@ default_platform(:android) ENV['SUPPLY_UPLOAD_MAX_RETRIES']='10' platform :android do + # Usage: fastlane incrementVersion type:(major|minor|patch|rc|final) + # For major, minor, and patch: will increment that version number by 1 and set the smaller ones to 0 + # For rc, final: will set build number to first rc/first final or increment it by 1 + desc "Increment version code and version name" + lane :incrementVersion do |options| + versionInfo = getVersionInfo() + versionComponents = parseVersionCode(versionInfo) + newVersionComponents = incrementVersionComponents(versionComponents: versionComponents, type: options[:type]) + versionNameGenerated = generateVersionName(newVersionComponents) + versionCodeGenerated = generateVersionCode(newVersionComponents) + + promptYesNo(text: "Version code: #{versionInfo["versionCode"]} -> #{versionCodeGenerated}\n" + + "Version name: #{versionInfo["versionName"]} -> #{versionNameGenerated}" + ) + writeVersions(versionCode: versionCodeGenerated, versionName: versionNameGenerated) + end + desc "Run tests and build app" lane :releasePhase1 do sh("rm -rf ../release/ && mkdir -p ../release") @@ -45,6 +62,7 @@ platform :android do desc "Release phase 2: checks, tag, create GH release, upload to appstores" lane :releasePhase2 do + ensure_git_status_clean(show_uncommitted_changes: true) versionInfo = getVersionInfo() versionComponents = parseVersionCode(versionInfo) checkReleasable(versionComponents) @@ -71,23 +89,6 @@ platform :android do print "Patch: #{versionComponents["patch"]}\n" print "Build: #{versionComponents["build"]}\n" end - - # Usage: fastlane incrementVersion type:(major|minor|patch|rc|final) - # For major, minor, and patch: will increment that version number by 1 and set the smaller ones to 0 - # For rc, final: will set build number to first rc/first final or increment it by 1 - desc "Increment version code and version name" - lane :incrementVersion do |options| - versionInfo = getVersionInfo() - versionComponents = parseVersionCode(versionInfo) - newVersionComponents = incrementVersionComponents(versionComponents: versionComponents, type: options[:type]) - versionNameGenerated = generateVersionName(newVersionComponents) - versionCodeGenerated = generateVersionCode(newVersionComponents) - - promptYesNo(text: "Version code: #{versionInfo["versionCode"]} -> #{versionCodeGenerated}\n" + - "Version name: #{versionInfo["versionName"]} -> #{versionNameGenerated}" - ) - writeVersions(versionCode: versionCodeGenerated, versionName: versionNameGenerated) - end desc "Upload Alpha version to play store" lane :uploadAlphaToPlayStore do |options|