mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-03 05:43:52 -07:00
Make gradle take build number from env vars and add git build info (#5890)
* Make gradle take build number from env vars * Add git information to manifest and version command/log * trim * Fix tests by adding NotNull annotations * rebase * Apply suggestions from kashike Co-authored-by: Riley Park <rileysebastianpark@gmail.com> * Not always show branch * Why can't everything be NotNull by default? * Rebase Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
This commit is contained in:
@@ -71,10 +71,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ manifest {
|
||||
+ val git = Git(rootProject.layout.projectDirectory.path)
|
||||
+ val gitHash = git("rev-parse", "HEAD").getText().substring(0, 7)
|
||||
+ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
+ attributes(
|
||||
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
+ "Implementation-Title" to "CraftBukkit",
|
||||
+ "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
||||
+ "Implementation-Version" to "git-Paper-$implementationVersion",
|
||||
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||
+ "Specification-Title" to "Bukkit",
|
||||
+ "Specification-Version" to project.version,
|
||||
|
Reference in New Issue
Block a user