Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
--- a/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts
|
|
+++ b/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts
|
|
@@ -8,29 +8,10 @@ interface Injected {
|
|
val execOps: ExecOperations
|
|
}
|
|
|
|
-val currentShortRevision = ByteArrayOutputStream().use {
|
|
- val execOps = objects.newInstance<Injected>().execOps
|
|
- execOps.exec {
|
|
- executable = "git"
|
|
- args = listOf("rev-parse", "HEAD")
|
|
- standardOutput = it
|
|
- }
|
|
- it.toString().trim().substring(0, 8)
|
|
-}
|
|
-
|
|
tasks.withType<Jar> {
|
|
manifest {
|
|
val buildNumber = System.getenv("BUILD_NUMBER")
|
|
- val velocityHumanVersion: String =
|
|
- if (project.version.toString().endsWith("-SNAPSHOT")) {
|
|
- if (buildNumber == null) {
|
|
- "${project.version} (git-$currentShortRevision)"
|
|
- } else {
|
|
- "${project.version} (git-$currentShortRevision-b$buildNumber)"
|
|
- }
|
|
- } else {
|
|
- archiveVersion.get()
|
|
- }
|
|
+ val velocityHumanVersion = System.getenv("BUILD_VERSION");
|
|
attributes["Implementation-Version"] = velocityHumanVersion
|
|
}
|
|
}
|