Skip to content

Commit

Permalink
Change the gradle version code to use better logic
Browse files Browse the repository at this point in the history
The previous version would check any tag in the repo and not just from
the ones that are from the current commit. This would ruin, in the
future, doing reproducible builds.
  • Loading branch information
dbrodie committed Jun 10, 2016
1 parent 000eed0 commit 1bed99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def getVersionCode = { ->
try {
def code = new ByteArrayOutputStream()
exec {
commandLine 'git', 'tag', '--list', 'v*'
commandLine 'git' 'rev-list' 'HEAD' '--first-parent' '--count'
standardOutput = code
}
return code.toString().split("\n").size()
Expand Down

0 comments on commit 1bed99f

Please sign in to comment.