Skip to content

Commit

Permalink
Adds support for -Dbuild.version_qualifier (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
eirsep authored Mar 22, 2022
1 parent 01653b5 commit e9a7982
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"
}
Expand Down

0 comments on commit e9a7982

Please sign in to comment.