为版本号添加提交hash
This commit is contained in:
parent
25a3f41e88
commit
45829d736a
1 changed files with 10 additions and 1 deletions
11
build.gradle
11
build.gradle
|
@ -4,7 +4,16 @@ plugins {
|
||||||
id 'org.spongepowered.mixin' version '0.7.+'
|
id 'org.spongepowered.mixin' version '0.7.+'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = '0.0.8-SNAPSHOT'
|
def getGitCommitHash() {
|
||||||
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
return stdout.toString().trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
version = '0.0.8-SNAPSHOT-' + getGitCommitHash()
|
||||||
group = 'com.Atsushio.target'
|
group = 'com.Atsushio.target'
|
||||||
archivesBaseName = 'target'
|
archivesBaseName = 'target'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue