2021-06-23 17:19:44 +00: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-06-27 04:51:03 +00:00
|
|
|
index 13d392b6f2715f1b905d8b93a7cd8df3ce62f8e9..5540da58e66f83b283863d3158a9b4ab5ba636db 100644
|
2021-06-23 17:19:44 +00:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
|
|
|
@@ -78,6 +78,7 @@ tasks.jar {
|
|
|
|
val git = Git(rootProject.layout.projectDirectory.path)
|
2021-06-27 04:51:03 +00:00
|
|
|
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
2021-06-23 17:19:44 +00:00
|
|
|
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
|
|
|
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
|
|
|
attributes(
|
|
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
|
|
"Implementation-Title" to "CraftBukkit",
|
|
|
|
@@ -87,6 +88,8 @@ tasks.jar {
|
|
|
|
"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)
|