From 371c35a0a5fa527098a19b7e5043cffbe9fa5fda Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 24 Aug 2021 21:31:04 +0000 Subject: [PATCH] Add support for -Dbuild.snapshot=true/false and default to building snapshot. Signed-off-by: dblock --- .github/workflows/ci.yml | 2 +- build.gradle | 3 ++- plugin-descriptor.properties | 2 +- pom.xml | 17 ++++++++++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7c4b6b8a9..4cde08603e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - name: Build OpenSearch working-directory: ./OpenSearch - run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal - name: Checkstyle run: mvn -B checkstyle:checkstyle diff --git a/build.gradle b/build.gradle index 8bcfd8b4ec..795ac83164 100644 --- a/build.gradle +++ b/build.gradle @@ -38,6 +38,7 @@ buildDir = 'gradle-build' ext { securityPluginVersion = '1.1.0.0' + opensearchVersion = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT") isSnapshot = "true" == System.getProperty("build.snapshot", "true") } @@ -67,7 +68,7 @@ ospackage { user 'root' permissionGroup 'root' - requires('opensearch-oss', "1.1.0", EQUAL) + requires('opensearch-oss', opensearchVersion - '-SNAPSHOT', EQUAL) packager = 'Amazon' vendor = 'Amazon' os = 'LINUX' diff --git a/plugin-descriptor.properties b/plugin-descriptor.properties index 18a95bc710..47cb937da0 100644 --- a/plugin-descriptor.properties +++ b/plugin-descriptor.properties @@ -3,7 +3,7 @@ description=Provide access control related features for OpenSearch 1.0.0 # # 'version': plugin's version -version=1.1.0.0-SNAPSHOT +version=1.1.0.0 # # 'name': the plugin name name=opensearch-security diff --git a/pom.xml b/pom.xml index be2a243b0d..c5bbb6bb9f 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ org.opensearch opensearch-security jar - 1.1.0.0-SNAPSHOT + ${version} OpenSearch Security OpenSearch Security https://github.com/opensearch-project/security @@ -68,7 +68,8 @@ 1.8 8 - 1.1.0 + 1.1.0-SNAPSHOT + 1.1.0.0 2.0.25.Final @@ -103,7 +104,6 @@ https://github.com/opensearch-project/security scm:git:git@github.com:opensearch-project/security.git scm:git:git@github.com:opensearch-project/security.git - 1.0.1.0 @@ -831,6 +831,17 @@ + + + + build.snapshot + !false + + + + 1.1.0.0-SNAPSHOT + + advanced