thia time its another pain

This commit is contained in:
2016-07-21 18:23:45 +02:00
parent 57fe4b6070
commit 3251370335

View File

@@ -38,6 +38,30 @@ archivesBaseName = "taiga"
ext.tag = "snapshot"
ext.changes = ""
task buildInfo {
def cmd = "git describe --tags \$(git rev-list --tags --max-count=1)"
def proc = cmd.execute()
proc.waitFor()
if (proc.exitValue() == 0) {
project.ext.tag = proc.text.trim()
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = System.getenv().BUILD_NUMBER
}
project.ext.mc_version = project.minecraft.version.split('-')[0]
def cmd_changes = "git log \$(git describe --tags --abbrev=0)..\$(git describe --tags \$(git rev-list --tags --max-count=1)) --oneline"
def proc_changes = cmd_changes.execute()
proc_changes.waitFor()
if (proc_changes.exitValue() == 0) {
project.ext.changes = proc_changes.text.trim()
}
}
version = "${mc_version}-${tag}"
minecraft {
version = "1.10.2-12.18.1.2011"
runDir = "run"
@@ -72,30 +96,6 @@ sourceSets {
}
}
task buildInfo {
def cmd = "git describe --tags \$(git rev-list --tags --max-count=1)"
def proc = cmd.execute()
proc.waitFor()
if (proc.exitValue() == 0) {
project.ext.tag = proc.text.trim()
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = System.getenv().BUILD_NUMBER
}
project.ext.mc_version = project.minecraft.version.split('-')[0]
def cmd_changes = "git log \$(git describe --tags --abbrev=0)..\$(git describe --tags \$(git rev-list --tags --max-count=1)) --oneline"
def proc_changes = cmd_changes.execute()
proc_changes.waitFor()
if (proc_changes.exitValue() == 0) {
project.ext.changes = proc_changes.text.trim()
}
}
version = "${mc_version}-${tag}"
//noinspection GroovyAssignabilityCheck
processResources {
// this will ensure that this task is redone when the versions change.