2021-06-23 19:19:44 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Professor Bloodstone <git@bloodstone.dev>
|
|
|
|
Date: Sun, 20 Jun 2021 01:14:41 +0200
|
|
|
|
Subject: [PATCH] Add git branch and commit to manifest
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
2021-08-14 12:01:07 +02:00
|
|
|
index 0311fb1e70eb52da19685f7d9d815daf8f3a83ab..3927eb2cd13499bca7561ae7d9be45ae86522125 100644
|
2021-06-23 19:19:44 +02:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
2021-07-20 00:58:48 +02:00
|
|
|
@@ -76,6 +76,7 @@ tasks.jar {
|
2021-06-27 06:51:03 +02:00
|
|
|
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
2021-06-23 19:19:44 +02:00
|
|
|
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
2021-07-12 08:24:48 +02:00
|
|
|
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
2021-06-23 19:19:44 +02:00
|
|
|
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
|
|
|
attributes(
|
|
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
|
|
"Implementation-Title" to "CraftBukkit",
|
2021-07-20 00:58:48 +02:00
|
|
|
@@ -85,6 +86,8 @@ tasks.jar {
|
2021-06-23 19:19:44 +02:00
|
|
|
"Specification-Version" to project.version,
|
|
|
|
"Specification-Vendor" to "Bukkit Team",
|
|
|
|
"Multi-Release" to "true", // Paper
|
|
|
|
+ "Git-Branch" to gitBranch, // Paper
|
|
|
|
+ "Git-Commit" to gitHash, // Paper
|
|
|
|
)
|
|
|
|
for (tld in setOf("net", "com", "org")) {
|
|
|
|
attributes("$tld/bukkit", "Sealed" to true)
|