1
0
forked from xjboss/KCauldronX

Update readme [no deploy]

This commit is contained in:
Prototik
2015-05-28 20:25:46 +07:00
parent 26bf1dc027
commit d9f726c43d
2 changed files with 5 additions and 6 deletions

View File

@ -48,13 +48,13 @@ minecraft {
group = 'pw.prok'
def retrieveBuildNumber() {
if (!project.hasProperty('officialBuild')) return 'UNOFFICIAL'
if (!project.hasProperty('officialBuild')) return 'UNOFFICIAL.' + retrieveGitHash(false)
new JsonSlurper().parse(new URL("https://prok.pw/version/${group}/${name}"))['nextBuildNumber']
}
def retrieveGitHash() {
def retrieveGitHash(full = true) {
if (file('.git').exists())
return ['git', 'log', '--format=%H', '-n', '1'].execute().text.trim()
return ['git', 'log', "--format=%${full?'H':'h'}", '-n', '1'].execute().text.trim()
return 'NOTGIT'
}