Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying build qualifier only to knn plugin version #330

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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:
// "<opensearch_version before first '-'>-<build.version_qualifier>-<SNAPSHOT optional>"
// for plugin artifacts produced by this script the version schema is very similar except for additional '0' as a minor version:
// "<opensearch_version before first '-'>.0-<build.version_qualifier>-<SNAPSHOT optional>"
// 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
Expand Down