Parse version from git-describe
This commit is contained in:
@@ -28,7 +28,7 @@ apply plugin: 'org.spongepowered.mixin'
|
|||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
version = "1.0.5"
|
version = gitDescribe()
|
||||||
group= "com.replaymod"
|
group= "com.replaymod"
|
||||||
archivesBaseName = "replaymod"
|
archivesBaseName = "replaymod"
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getGitCommitHash() {
|
def gitDescribe() {
|
||||||
try {
|
try {
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
exec {
|
exec {
|
||||||
@@ -162,7 +162,7 @@ processResources
|
|||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
|
|
||||||
// replace version and mcversion
|
// replace version and mcversion
|
||||||
expand 'version':project.version + '-' + getGitCommitHash(), 'mcversion':project.minecraft.version
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy everything else, thats not the mcmod.info
|
// copy everything else, thats not the mcmod.info
|
||||||
|
|||||||
Reference in New Issue
Block a user