Skip to content

Commit 1ed61c5

Browse files
committed
qualifier only in staging build
1 parent 92790a7 commit 1ed61c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
allprojects {
2121
group = "co.elastic.clients"
2222
// Release manager provides a $VERSION. If not present, it's a local or CI snapshot build.
23-
version = System.getenv("VERSION") ?:
24-
(File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT")
23+
// also need to add the qualifier in case it's a staging build
24+
version = if(System.getenv("VERSION").isEmpty()) (File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT")
25+
else System.getenv("VERSION") + "-" + File(project.rootDir, "config/version-qualifier.txt").readText().trim()
26+
2527
repositories {
2628
maven {
2729
name = "Elastic-Snapshots"

0 commit comments

Comments
 (0)