From d5c706fb073f00b3ce3ff25e53063deddbe71bec Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 29 Jan 2021 16:28:52 -0800 Subject: [PATCH] trying to not have all travis builds show "dirty" --- .travis.yml | 3 ++- xwords4/android/app/build.gradle | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9f6cfab6f..5465f0757 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,8 +35,9 @@ before_install: - sudo apt-get -qq update - sudo apt-get install -y python3-lxml imagemagick script: +- GITREV="$(git describe --tags --dirty)" - sed -i -e '/\/\/ rm-for-fdroid$/d' {.,app}/build.gradle -- ./gradlew asXw4dDeb +- ./gradlew asXw4dDeb -PGITREV="$GITREV" - scp -o "StrictHostKeyChecking no" -i /tmp/id_rsa_uploader -d app/build/outputs/apk/*/debug/*.apk uploader@eehouse.org:XW4D_UPLOAD notifications: diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 2b1b7af14..def74f971 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -37,11 +37,9 @@ boolean forFDroid = hasProperty('forFDroid') // Get the git revision we're using. Since fdroid modifies files as // part of its build process -dirty will always be added, confusing // users. So add that for the non-fdroid case. -def GITREV = "git describe --tags" -if (! forFDroid) { - GITREV += " --dirty" +if (! project.hasProperty('GITREV')) { + ext.GITREV = 'git describe --tags --dirty'.execute().text.trim() } -GITREV = GITREV.execute().text.trim() def GITREV_SHORT = "git rev-parse --short HEAD".execute().text.trim() // Make CURTAG non-empty IFF we're at a tag (release build)