fix: use git commit count as Android versionCode

Play Store rejects versionCode 1 since it was already used. Deriving
the build number from `git rev-list --count HEAD` gives a monotonically
increasing versionCode on every push with no manual bumping required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-13 19:23:24 +02:00
co-authored by Claude Sonnet 4.6
parent 3a69c39776
commit 2f376ef33c
+1 -1
View File
@@ -288,7 +288,7 @@ tasks:
generates:
- build/app/outputs/bundle/release/app-release.aab
cmds:
- ANDROID_HOME=${ANDROID_HOME:-$HOME/Android/Sdk} fvm flutter build appbundle --release --no-pub | grep -Ev "was tree-shaken|Tree-shaking can be disabled"
- ANDROID_HOME=${ANDROID_HOME:-$HOME/Android/Sdk} fvm flutter build appbundle --release --no-pub --build-number $(git rev-list --count HEAD) | grep -Ev "was tree-shaken|Tree-shaking can be disabled"
deploy-android:
desc: Build release APK and upload via scp to $ANDROID_APK_SCP_USER@$ANDROID_APK_SCP_HOST:$ANDROID_APK_SCP_PATH