New (new, new, new, new) way for handling versions. Will work with jenkins and fdroid.
This commit is contained in:
parent
2799a48f2b
commit
38b5e7dc65
@ -15,17 +15,13 @@ def gitVersion() {
|
||||
}
|
||||
|
||||
def versionCodeFromGit() {
|
||||
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0')
|
||||
def versionCode = gitVersion() + (ext.configuration.buildDate.format("yyMM") + dayInYear + ext.todaysBuilds).toInteger()
|
||||
println "version code " + versionCode
|
||||
return versionCode.toInteger()
|
||||
println "version code " + gitVersion()
|
||||
return gitVersion().toInteger()
|
||||
}
|
||||
|
||||
def versionNameFromGit() {
|
||||
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0')
|
||||
def versionName = gitVersion() + ext.configuration.buildDate.format('yyMM') + dayInYear + ext.todaysBuilds
|
||||
println "version name " + versionName
|
||||
return versionName
|
||||
println "version name " + gitVersion()
|
||||
return gitVersion()
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
14
version.sh
Executable file
14
version.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASE_VERSION="v1.6"
|
||||
TODAYS_VERSION="1"
|
||||
|
||||
VERSION="${BASE_VERSION}.$(date '+%y%m%j')$TODAYS_VERSION"
|
||||
|
||||
echo "Creating tag $VERSION"
|
||||
|
||||
git tag $VERSION
|
||||
|
||||
echo "Pushing tag"
|
||||
|
||||
git push origin $VERSION
|
Loading…
Reference in New Issue
Block a user