geforkt von Mirrors/Velocity
Include git revision and build number
Dieser Commit ist enthalten in:
Ursprung
01be081bda
Commit
3b5d20e62d
11
build.gradle
11
build.gradle
@ -27,6 +27,17 @@ allprojects {
|
|||||||
return os.toString().trim()
|
return os.toString().trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCurrentShortRevision = {
|
||||||
|
new ByteArrayOutputStream().withStream { os ->
|
||||||
|
exec {
|
||||||
|
executable = "git"
|
||||||
|
args = ["rev-parse", "HEAD"]
|
||||||
|
standardOutput = os
|
||||||
|
}
|
||||||
|
return os.toString().trim().substring(0, 8)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -14,8 +14,11 @@ compileTestJava {
|
|||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
|
def buildNumber = System.getenv("BUILD_NUMBER") ?: "unknown"
|
||||||
|
def version = "${project.version} (git-${project.ext.getCurrentShortRevision()}, build ${buildNumber})"
|
||||||
|
|
||||||
attributes 'Main-Class': 'com.velocitypowered.proxy.Velocity'
|
attributes 'Main-Class': 'com.velocitypowered.proxy.Velocity'
|
||||||
attributes 'Implementation-Version': project.version
|
attributes 'Implementation-Version': version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren