summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-05-05 20:57:54 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-05-05 20:57:54 -1000
commit68b58d45c54fcb9e4861491f19137f065c4035b9 (patch)
tree890f257003c5ad08ca0fb85b6020681697c1e9fc /.github
parent580a2dfb8cb381954a0fb2d5742567b5aff461c4 (diff)
fix(ci): write version to gradle.properties instead of -P flags
Parentheses in the version name (e.g. "(abc1234 message)") caused gradlew's internal eval to fail with "Syntax error: ( unexpected" because gradlew is /bin/sh and parens have special meaning in eval. Writing the values directly to gradle.properties avoids shell interpretation entirely — Gradle reads it as a plain key=value file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/android.yml7
1 files changed, 4 insertions, 3 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index b303eb6..7e68aed 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -27,11 +27,12 @@ jobs:
run: |
COMMIT_SHORT=$(git rev-parse --short HEAD)
COMMIT_MSG=$(git log -1 --pretty=format:'%s' | cut -c1-60)
- echo "BUILD_VERSION_CODE=${{ github.run_number }}" >> $GITHUB_ENV
- echo "BUILD_VERSION_NAME=1.0.${{ github.run_number }} (${COMMIT_SHORT} ${COMMIT_MSG})" >> $GITHUB_ENV
+ VN="1.0.${{ github.run_number }} (${COMMIT_SHORT} ${COMMIT_MSG})"
+ printf '\nbuildVersionCode=${{ github.run_number }}\nbuildVersionName=%s\n' "$VN" >> android-app/gradle.properties
+ echo "BUILD_VERSION_NAME=${VN}" >> $GITHUB_ENV
- name: Build with Gradle
- run: ./gradlew assembleDebug -PbuildVersionCode="$BUILD_VERSION_CODE" -PbuildVersionName="$BUILD_VERSION_NAME"
+ run: ./gradlew assembleDebug
working-directory: android-app
- name: upload artifact to Firebase App Distribution