fix: use commit-count based versionCode to prevent downgrade on Firebase

CI_BUILD_ID was using github.run_number which is per-workflow, causing
different workflows to produce different versionCodes (144 vs 9).
Now computed from git commit count + offset, consistent across all workflows.
Also added bundle task to local auto-increment.
This commit is contained in:
2026-03-10 02:18:55 +03:00
parent 8d150266fb
commit c965746f8f
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ def computeVersionCode() {
return Integer.valueOf(System.env.CI_BUILD_ID)
}
// Local build - auto increment
if (gradle.startParameter.taskNames.any { it.contains('assemble') || it.contains('install') }) {
if (gradle.startParameter.taskNames.any { it.contains('assemble') || it.contains('install') || it.contains('bundle') }) {
return incrementVersionCode()
}
return getVersionCodeFromFile()