Skip to content

Commit

Permalink
Add version info to build.gradle
Browse files Browse the repository at this point in the history
I copied this approach from other plugin repos, for example
[common-utils][1].

[1]: https://github.com/opensearch-project/common-utils/blob/7736e080f9b0a2f6f2d9ad3b4272090b281ea8fa/build.gradle#L43-L52

Signed-off-by: Andrew Ross <andrross@amazon.com>
  • Loading branch information
andrross committed Sep 7, 2023
1 parent be8891d commit fbccd79
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ buildscript {
ext {
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
}

repositories {
Expand All @@ -39,6 +41,17 @@ repositories {
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
}

allprojects {
group 'org.opensearch.index.codec.customcodecs'
version = opensearch_version.tokenize('-')[0] + '.0'
if (buildVersionQualifier) {
version += "-${buildVersionQualifier}"
}
if (isSnapshot) {
version += "-SNAPSHOT"
}
}

apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.internal-cluster-test'

Expand Down

0 comments on commit fbccd79

Please sign in to comment.