Skip to content

Commit 402e05e

Browse files
committed
Use short commit hash instead of -SNAPSHOT in snapshot versions
Replaces the default -SNAPSHOT suffix with -<7-char commit hash> for snapshot builds (e.g. 0.1.0-abc1234). Release versions from tags are unchanged. The version assignment is moved after the scmVersion block so the custom snapshotCreator is applied.
1 parent e74aac0 commit 402e05e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins {
88
}
99

1010
group = "com.fulcrumgenomics"
11-
version = scmVersion.version
1211

1312
java {
1413
sourceCompatibility = JavaVersion.VERSION_11
@@ -62,8 +61,13 @@ scmVersion {
6261
versionSeparator.set("") // no separator between prefix and version
6362
}
6463
versionIncrementer("incrementPatch") // default: bump patch for next SNAPSHOT
64+
snapshotCreator(pl.allegro.tech.build.axion.release.domain.properties.VersionProperties.Creator { _, position ->
65+
"-${position.shortRevision}"
66+
})
6567
}
6668

69+
version = scmVersion.version
70+
6771
// ---------------------------------------------------------------------------
6872
// Native build task — compiles JNI glue + libdeflate for the current platform
6973
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)