diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index fad345327c..27406fe505 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -20,7 +20,7 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..3e05459f27c4c5697ae65da504d67a6a /.project diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..6e5431276a68204ab7aee451b2074afc371068b5 +index 0000000000000000000000000000000000000000..e9db6b3bad237c0b3fdb14e96b6f0f29ba8ee312 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,135 @@ @@ -70,7 +70,7 @@ index 0000000000000000000000000000000000000000..6e5431276a68204ab7aee451b2074afc + + manifest { + val git = Git(rootProject.layout.projectDirectory.path) -+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText() ++ val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() + val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\"" + attributes( + "Main-Class" to "org.bukkit.craftbukkit.Main", diff --git a/patches/server/0719-Add-git-branch-and-commit-to-manifest.patch b/patches/server/0719-Add-git-branch-and-commit-to-manifest.patch index 916c508625..5e720e4f3c 100644 --- a/patches/server/0719-Add-git-branch-and-commit-to-manifest.patch +++ b/patches/server/0719-Add-git-branch-and-commit-to-manifest.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Add git branch and commit to manifest diff --git a/build.gradle.kts b/build.gradle.kts -index 2172b842ecd76a34d19fcaa54e087cc5b9ab8d7f..ff58e15e559c48d0dcf049e1b7708b71c0b789b6 100644 +index 13d392b6f2715f1b905d8b93a7cd8df3ce62f8e9..5540da58e66f83b283863d3158a9b4ab5ba636db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -78,6 +78,7 @@ tasks.jar { val git = Git(rootProject.layout.projectDirectory.path) - val gitHash = git("rev-parse", "--short=7", "HEAD").getText() + 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(