mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Get short commit ref using a more proper method
This commit is contained in:
parent
1b3946a0c5
commit
99bb2c025c
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ tasks.jar {
|
||||
val git = Git(rootProject.layout.projectDirectory.path)
|
||||
val gitHash = git("rev-parse", "HEAD").getText().substring(0, 7)
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
||||
attributes(
|
||||
|
|
|
@ -70,7 +70,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ manifest {
|
||||
+ val git = Git(rootProject.layout.projectDirectory.path)
|
||||
+ val gitHash = git("rev-parse", "HEAD").getText().substring(0, 7)
|
||||
+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText()
|
||||
+ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
+ attributes(
|
||||
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
|
|
Loading…
Reference in a new issue