From e9a79826b0bdb1f8d19a742605d1f4764d9ba6d1 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Tue, 22 Mar 2022 15:15:38 +0530 Subject: [PATCH] Adds support for -Dbuild.version_qualifier (#115) Signed-off-by: Surya Sashank Nistala --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 64d009d5..b6c3d5bc 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ buildscript { opendistro_plugin_version = System.getProperty("bwc.version", "1.13.0.1") opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') common_utils_version = System.getProperty("common_utils.version", opensearch_build) + buildVersionQualifier = System.getProperty("build.version_qualifier") } repositories { @@ -77,7 +78,10 @@ targetCompatibility = JavaVersion.VERSION_11 allprojects { group 'org.opensearch' - version = opensearch_version - '-SNAPSHOT' + '.0' + version = opensearch_version.tokenize('-')[0] + '.0' + if (buildVersionQualifier) { + version += "-${buildVersionQualifier}" + } if (isSnapshot) { version += "-SNAPSHOT" }