diff options
author | Jason Penilla <[email protected]> | 2024-12-17 19:41:47 -0800 |
---|---|---|
committer | Jason Penilla <[email protected]> | 2024-12-17 19:41:47 -0800 |
commit | e97bf6933c23580d51ec355264b76f873bde2be0 (patch) | |
tree | 6e49e33fecdfc7427bf801bae043bb6063acfbf9 /paper-server | |
parent | c55ad7092c017818459fc60b7b07d247cef05353 (diff) | |
download | Paper-e97bf6933c23580d51ec355264b76f873bde2be0.tar.gz Paper-e97bf6933c23580d51ec355264b76f873bde2be0.zip |
Only include build time in manifest for numbered builds
Diffstat (limited to 'paper-server')
-rw-r--r-- | paper-server/build.gradle.kts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paper-server/build.gradle.kts b/paper-server/build.gradle.kts index 4844881912..8a25dc0885 100644 --- a/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts @@ -181,12 +181,12 @@ dependencies { // Paper end - spark } - tasks.jar { manifest { val git = Git(rootProject.layout.projectDirectory.path) val mcVersion = rootProject.providers.gradleProperty("mcVersion").get() val build = System.getenv("BUILD_NUMBER") ?: null + val buildTime = if (build != null) Instant.now() else Instant.EPOCH val gitHash = git.exec(providers, "rev-parse", "--short=7", "HEAD").get().trim() val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash" val date = git.exec(providers, "show", "-s", "--format=%ci", gitHash).get().trim() // Paper @@ -202,7 +202,7 @@ tasks.jar { "Brand-Id" to "papermc:paper", "Brand-Name" to "Paper", "Build-Number" to (build ?: ""), - "Build-Time" to Instant.now().toString(), + "Build-Time" to buildTime.toString(), "Git-Branch" to gitBranch, // Paper "Git-Commit" to gitHash, // Paper ) |