From 01bcb03aff654320e83d586cf574371661a5e99c Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Thu, 6 Oct 2022 03:53:03 -0700 Subject: [PATCH] Add versioning to Android app --- .github/workflows/release.yml | 3 ++- mobile/android/app/build.gradle | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5b32fc9..913246fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,11 +23,12 @@ jobs: read -ra semverArray <<< $semver tagV=$(echo ${semverArray[0]} | sed 's/v//') clientV=$(jq -r .version frontend/package.json) + androidV=$(grep -oP '(?<=versionName ").*?((?=\-)|$)' mobile/android/app/build.gradle) coordinatorV=$(jq -r .major version.json).$(jq -r .minor version.json).$(jq -r .patch version.json) printf "Client version: ${clientV}\nCoordinator version: ${coordinatorV}\nGit tag version: ${tagV}\n" - if [ "$coordinatorV" = "$clientV" ] && [ "$coordinatorV" = "$tagV" ] ; then + if [ "$coordinatorV" = "$clientV" ] && [ "$coordinatorV" = "$tagV" ] && [ "$coordinatorV" = "$androidV" ]; then echo "Versions match!" echo '::set-output name=semver::'$semver else diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index c5a12e74..062f137a 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -149,7 +149,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "1.0" + versionName "0.2.1-alpha" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) {