3
0

Add git commit hash to server's manifest

This commit is contained in:
Prototik 2015-05-27 00:31:16 +07:00
parent 58ea094454
commit 3b357c0d90

View File

@ -52,6 +52,12 @@ def retrieveBuildNumber() {
new JsonSlurper().parse(new URL("https://prok.pw/version/${group}/${name}"))['nextBuildNumber']
}
def retrieveGitHash() {
if (file('.git').exists())
return ['git', 'log', '--format=%H', '-n', '1'].execute().text.trim()
return 'NOTGIT'
}
ext.mcVersion = "1.7.10"
ext.forgeVersion = "1403"
ext.revision = retrieveBuildNumber()
@ -65,6 +71,7 @@ launch4j {
tasks.packageUniversal {
classifier = 'server'
manifest.attributes([
'KCauldron-Git-Hash': retrieveGitHash(),
'Implementation-Vendor': 'Prototik',
'Implementationk-Title': 'KCauldron',
'Implementation-Version': 'KCauldron-'+project.version,