diff --git a/build.gradle.kts b/build.gradle.kts index 70a44a710..18588c0ae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,7 +19,9 @@ allprojects { group = "co.elastic.clients" - version = (File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT") + // Release manager provides a $VERSION. If not present, it's a local or CI snapshot build. + version = System.getenv("VERSION") ?: + (File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT") repositories { maven {