Change code version to base on number of commits

This commit is contained in:
Sylwester Zieliński
2022-02-16 16:34:13 +01:00
parent a38a04af46
commit faef3720ad

View File

@@ -2,10 +2,10 @@ ext.getVersionCodeFromTags = { ->
try {
def code = new ByteArrayOutputStream()
exec {
commandLine 'git', 'tag', '--list'
commandLine 'git', 'log'
standardOutput = code
}
return 35 + code.toString().split("\n").size()
return code.toString().split("\n").size()
}
catch (ignored) {
return -1