Fix issue with bad versionCode generated by Buildkite (#553)

This commit is contained in:
Benoit Marty 2019-09-12 16:05:04 +02:00 committed by Benoit Marty
parent f2c8d4ad02
commit 618e9a4f52
2 changed files with 12 additions and 4 deletions

View file

@ -13,13 +13,14 @@ Other changes:
Bugfix:
- Fix crash due to missing informationData (#535)
- Progress in initial sync dialog is decreasing for a step and should not (#532)
- Fix rendering issue of accepted third party invitation event
Translations:
-
Build:
- Fix issue with version name (#533)
- Fix rendering issue of accepted third party invitation event
- Fix issue with bad versionCode generated by Buildkite (#553)
Changes in RiotX 0.4.0 (2019-XX-XX)
===================================================

View file

@ -51,8 +51,15 @@ static def gitRevisionDate() {
}
static def gitBranchName() {
def cmd = "git rev-parse --abbrev-ref HEAD"
return cmd.execute().text.trim()
def fromEnv = System.env.BUILDKITE_BRANCH as String ?: ""
if (!fromEnv.isEmpty()) {
return fromEnv
} else {
// Note: this command return "HEAD" on Buildkite, so use the system env 'BUILDKITE_BRANCH' content first
def cmd = "git rev-parse --abbrev-ref HEAD"
return cmd.execute().text.trim()
}
}
static def getVersionSuffix() {
@ -75,7 +82,7 @@ project.android.buildTypes.all { buildType ->
// 64 bits have greater value than 32 bits
ext.abiVersionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86": 3, "x86_64": 4].withDefault { 0 }
def buildNumber = System.getenv("BUILDKITE_BUILD_NUMBER") as Integer ?: 0
def buildNumber = System.env.BUILDKITE_BUILD_NUMBER as Integer ?: 0
android {
compileSdkVersion 28