Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
andy describe
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinVin committed Aug 16, 2022
1 parent 2cf77fa commit 590302d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ci/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ccache -s

cd src/android
chmod +x ./gradlew
./gradlew bundle${BUILD_FLAVOR}Release
./gradlew assemble${BUILD_FLAVOR}Release
./gradlew bundle${BUILD_FLAVOR}Release

ccache -s
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
sudo apt-get install ccache -y
- name: Build
run: |
git describe --always
./.ci/android/build.sh
git status
- name: Copy artifacts
Expand Down
10 changes: 8 additions & 2 deletions src/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,17 @@ def getVersion() {
def versionName = '0.0'

try {
versionName = 'git describe --always'.execute([], project.rootDir).text
.trim()
versionName = 'git describe --always --long'.execute([], project.rootDir).text
.trim()
.replaceAll(/(-0)?-[^-]+$/, "")
} catch (Exception) {
logger.error('Cannot find git, defaulting to dummy version number')
}

if (System.getenv("GITHUB_ACTIONS") != null) {
def gitTag = System.getenv("GIT_TAG_NAME")
versionName = gitTag ?: versionName
}

return versionName
}

0 comments on commit 590302d

Please sign in to comment.