From 820352405ea6e67503815186dba1fa47e7252b93 Mon Sep 17 00:00:00 2001 From: Martin Gaievski <94878159+martin-gaievski@users.noreply.github.com> Date: Wed, 23 Mar 2022 10:05:57 -0700 Subject: [PATCH] Applying build qualifier only to knn plugin version (#330) Signed-off-by: Martin Gaievski --- build.gradle | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index f2de4fb7d..1c7e6175b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,24 +9,13 @@ import org.opensearch.gradle.test.RestIntegTestTask buildscript { ext { - // for opensearch that is used by plugin following version schema is in use: - // "--" - // for plugin artifacts produced by this script the version schema is very similar except for additional '0' as a minor version: - // ".0--" + // build.version_qualifier parameter applies to knn plugin artifacts only. OpenSearch version must be set + // explicitly as 'opensearch.version' property, for instance opensearch.version=2.0.0-alpha1-SNAPSHOT opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT") knn_bwc_version = System.getProperty("bwc.version", "1.2.0.0-SNAPSHOT") version_qualifier = System.getProperty("build.version_qualifier", "") opensearch_bwc_version = "${knn_bwc_version}" - ".0-SNAPSHOT" opensearch_group = "org.opensearch" - - version_with_qualifier = opensearch_version.tokenize('-')[0] - if (version_qualifier) { - version_with_qualifier += "-${version_qualifier}" - } - if(opensearch_version.tokenize('-')[1]) { - version_with_qualifier += "-${opensearch_version.tokenize('-')[1]}" - } - opensearch_version = version_with_qualifier } // This isn't applying from repositories.gradle so repeating git diff it here