Skip to content

Commit

Permalink
Add commit hash to build number
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Feb 21, 2018
1 parent d4bc96c commit 509377c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ plugins {

group = 'ml.duncte123.skybot'

version '3.61.12'
version "3.61.12_${getGitHash()}"

sourceCompatibility = 1.9

Expand Down Expand Up @@ -156,3 +156,12 @@ kotlin {
coroutines "enable"
}
}

def getGitHash() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}

0 comments on commit 509377c

Please sign in to comment.