mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-06 14:07:32 +00:00
chore: address review comments
This commit is contained in:
parent
b1dff6a7ce
commit
fc4eb2b2c8
3 changed files with 14 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ android {
|
|||
versionCode VERSION_CODE as Integer
|
||||
versionName VERSION_NAME
|
||||
buildConfigField 'String', 'VERSION_ENVIRONMENT', '"'+VERSION_ENVIRONMENT+'"'
|
||||
buildConfigField 'String', 'VERSION_GIT_TAG', '"'+VERSION_GIT_TAG+'"'
|
||||
}
|
||||
|
||||
String env_release_store_file = System.getenv("release_store_file")
|
||||
|
|
|
|||
|
|
@ -65,12 +65,23 @@ def getVersionEnvironment = { ->
|
|||
}
|
||||
}
|
||||
|
||||
def getVersionGitTag = { ->
|
||||
String env_git_tag = System.getenv("VERSION_GIT_TAG")
|
||||
if (env_git_tag != null) {
|
||||
println "Using $env_git_tag from VERSION_GIT_TAG"
|
||||
return "$env_git_tag"
|
||||
} else {
|
||||
// Building probably from IDE
|
||||
println "Using release@$VERSION_NAME"
|
||||
return "release@$VERSION_NAME"
|
||||
}
|
||||
}
|
||||
ext {
|
||||
VERSION_CODE=getVersionCode()
|
||||
VERSION_NAME=getVersionName()
|
||||
VERSION_ENVIRONMENT=getVersionEnvironment()
|
||||
VERSION_TAG=System.getenv("VERSION_TAG")
|
||||
VERSION_GIT_TAG=System.getenv("VERSION_GIT_TAG")
|
||||
VERSION_GIT_TAG=getVersionGitTag()
|
||||
}
|
||||
|
||||
//println "version.gradle: VERSION_TAG: " + VERSION_TAG
|
||||
|
|
@ -156,6 +156,7 @@ function printVersionUtilsDebug() {
|
|||
echo "TIER: $TIER"
|
||||
echo "VERSION_TAG: $VERSION_TAG"
|
||||
echo "VERSION_WITH_TAG: $VERSION_WITH_TAG"
|
||||
echo "VERSION_GIT_TAG: $VERSION_GIT_TAG"
|
||||
echo "VERSION_ENVIRONMENT: $VERSION_ENVIRONMENT"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue