Skip to content

Commit

Permalink
RSDK-7263 include RDK + APK sha in app's version string (#8)
Browse files Browse the repository at this point in the history
* env vars for app version, bump versionCode, base version 0.1.0

* sigh missing paren

* get dash right in version suffix
  • Loading branch information
abe-winter authored Apr 10, 2024
1 parent 82fe14e commit 7466181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ jobs:
run: |
mkdir ../dist
source $SDKMAN_DIR/bin/sdkman-init.sh
export APK_VERSION_SUFFIX=-$(date +%y%m%d)-$(cd ../rdk && git rev-parse --short HEAD)-$(git rev-parse --short HEAD)
# todo(review): is it safe to use gradle in path instead of gradlew? or way to make gradlew use system gradle?
RDK_PATH=$(realpath ../rdk/droid-rdk.arm64.aar) gradle --no-daemon assembleDebug
mv app/build/outputs/apk/debug/app-debug.apk \
../dist/rdk-$(date +%y%m%d)-$(cd ../rdk && git rev-parse --short HEAD)-$(git rev-parse --short HEAD).aarch64.apk
../dist/rdk$APK_VERSION_SUFFIX.aarch64.apk
RDK_PATH=$(realpath ../rdk/droid-rdk.amd64.aar) gradle --no-daemon assembleDebug
mv app/build/outputs/apk/debug/app-debug.apk \
../dist/rdk-$(date +%y%m%d)-$(cd ../rdk && git rev-parse --short HEAD)-$(git rev-parse --short HEAD).x86_64.apk
../dist/rdk$APK_VERSION_SUFFIX.x86_64.apk
- uses: actions/upload-artifact@v4
with:
name: Arm APK
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.viam.rdk.fgservice"
minSdk = 28
targetSdk = 28
versionCode = 1
versionName = "0.0.1"
versionCode = 2
versionName = "${System.getenv("APK_VERSION") ?: "0.1.0"}${System.getenv("APK_VERSION_SUFFIX") ?: ""}"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down

0 comments on commit 7466181

Please sign in to comment.