[ci skip] Use commit timestamp instead of build time in manifest (#6161)

This commit is contained in:
Jason 2021-07-11 23:24:48 -07:00 committed by GitHub
parent 70ea1b2e2b
commit 40b34615b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 15 deletions

View file

@ -5,18 +5,18 @@ Subject: [PATCH] Add git branch and commit to manifest
diff --git a/build.gradle.kts b/build.gradle.kts
index 9ac8a46478ee945d0425d4d713e8e7239f3156cd..4605634d1e0d2c6592d4152e697680e078380868 100644
index 88694b73f7c9d02c8d0d4f38ef0533b9eb9e3497..682935762008602ca214f68147766792cbedeea9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -76,6 +76,7 @@ tasks.jar {
val git = Git(rootProject.layout.projectDirectory.path)
@@ -77,6 +77,7 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
@@ -85,6 +86,8 @@ tasks.jar {
@@ -86,6 +87,8 @@ tasks.jar {
"Specification-Version" to project.version,
"Specification-Vendor" to "Bukkit Team",
"Multi-Release" to "true", // Paper