Add versioning to Android app

This commit is contained in:
Reckless_Satoshi 2022-10-06 03:53:03 -07:00
parent 5d5d4d1c09
commit 01bcb03aff
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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()) {