Skip to content

Commit 25aa6cf

Browse files
jiangzhodongjoon-hyun
authored andcommitted
[SPARK-51577] Make gradle build to automatically append SNAPSHOT suffix to version for non-release builds
### What changes were proposed in this pull request? This PR makes gradle build automatically append `-SNAPSHOT` suffix to `version` for non-release builds ### Why are the changes needed? This would help to automatically set up builds based on gradle release properties ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass the CIs ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#170 from jiangzho/main. Authored-by: Zhou JIANG <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 9cf0bac commit 25aa6cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ assert JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17): "Java 17
3434

3535
allprojects {
3636
group = "org.apache.spark.k8s.operator"
37-
version = "0.1.0-SNAPSHOT"
37+
version = "0.1.0"
38+
if (!project.hasProperty('release')) {
39+
version += "-SNAPSHOT"
40+
}
3841
}
3942

4043
tasks.register('buildDockerImage', Exec) {

0 commit comments

Comments
 (0)