[ci skip] Use commit timestamp instead of build time in manifest (#6161)

This commit is contained in:
Jason Penilla
2021-07-11 23:24:48 -07:00
parent 67e2594825
commit 713b774a85
3 changed files with 4 additions and 3 deletions

View File

@@ -72,11 +72,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ val git = Git(rootProject.layout.projectDirectory.path)
+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
+ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
+ val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
+ attributes(
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
+ "Implementation-Title" to "CraftBukkit",
+ "Implementation-Version" to "git-Paper-$implementationVersion",
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
+ "Implementation-Vendor" to date, // Paper
+ "Specification-Title" to "Bukkit",
+ "Specification-Version" to project.version,
+ "Specification-Vendor" to "Bukkit Team",