Skip to content

Commit e09fa7f

Browse files
author
rotieno
committed
chore: use version code from no of commits
1 parent 6a7df1e commit e09fa7f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.buildsystem/versioning.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
ext.getVersionCode = { ->
1111
try {
12-
return 2
12+
def stdout = new ByteArrayOutputStream()
13+
exec {
14+
commandLine 'git', 'rev-list', '--all', '--count'
15+
standardOutput = stdout
16+
}
17+
return stdout.toString().trim().toInteger()
1318
}
1419
catch (ignored) {
1520
return -1;

0 commit comments

Comments
 (0)