3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00
Paper/patches/server/0718-Add-git-branch-and-commit-to-manifest.patch

28 Zeilen
1.3 KiB
Diff

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-07-07 19:18:05 +02:00
index 9ac8a46478ee945d0425d4d713e8e7239f3156cd..4605634d1e0d2c6592d4152e697680e078380868 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
2021-07-07 19:18:05 +02:00
@@ -76,6 +76,7 @@ tasks.jar {
val git = Git(rootProject.layout.projectDirectory.path)
2021-06-27 06:51:03 +02:00
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
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",
2021-07-07 19:18:05 +02:00
@@ -85,6 +86,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)