Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
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()
|
||||
}
|
||||
}
|
||||
|
||||
getCurrentShortRevision = {
|
||||
new ByteArrayOutputStream().withStream { os ->
|
||||
exec {
|
||||
executable = "git"
|
||||
args = ["rev-parse", "HEAD"]
|
||||
standardOutput = os
|
||||
}
|
||||
return os.toString().trim().substring(0, 8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -14,8 +14,11 @@ compileTestJava {
|
||||
|
||||
jar {
|
||||
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 'Implementation-Version': project.version
|
||||
attributes 'Implementation-Version': version
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren