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 versionCodeFromGit() {
|
||||||
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0')
|
println "version code " + gitVersion()
|
||||||
def versionCode = gitVersion() + (ext.configuration.buildDate.format("yyMM") + dayInYear + ext.todaysBuilds).toInteger()
|
return gitVersion().toInteger()
|
||||||
println "version code " + versionCode
|
|
||||||
return versionCode.toInteger()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def versionNameFromGit() {
|
def versionNameFromGit() {
|
||||||
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0')
|
println "version name " + gitVersion()
|
||||||
def versionName = gitVersion() + ext.configuration.buildDate.format('yyMM') + dayInYear + ext.todaysBuilds
|
return gitVersion()
|
||||||
println "version name " + versionName
|
|
||||||
return versionName
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
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