From 235d27016499ca87f0b0937dbfb46cec172d2b03 Mon Sep 17 00:00:00 2001 From: Aditya Jindal <13850971+aditjind@users.noreply.github.com> Date: Thu, 9 Sep 2021 15:57:56 -0700 Subject: [PATCH] Add Commits related to Snapshot build of Common Utils on 1.1 (#67) * Using 1.1 snapshot version for OpenSearch (#57) Signed-off-by: Vacha * Build snapshot build by default with the same version as OpenSearch. (#58) Signed-off-by: dblock * Update build.gradle to reflect 1.1.0.0 version Co-authored-by: Vacha Co-authored-by: Daniel Doubrovkine (dB.) --- .github/workflows/ci.yml | 6 +++--- build.gradle | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8f51fdd..53c3d9b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,16 +34,16 @@ jobs: ref: '1.x' - name: Build OpenSearch working-directory: ./OpenSearch - run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal # common-utils - name: Build and Test run: | - ./gradlew build -Dopensearch.version=1.1.0 + ./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT - name: Publish to Maven Local run: | - ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0 + ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT - name: Upload Coverage Report uses: codecov/codecov-action@v1 diff --git a/build.gradle b/build.gradle index 0f2b241a..8037b004 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { ext { opensearch_group = "org.opensearch" - opensearch_version = System.getProperty("opensearch.version", "1.1.0") + opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT") kotlin_version = System.getProperty("kotlin.version", "1.4.32") } @@ -44,7 +44,17 @@ repositories { jcenter() } -group 'org.opensearch.commons' +ext { + isSnapshot = "true" == System.getProperty("build.snapshot", "true") +} + +allprojects { + group 'org.opensearch.commons' + version = opensearch_version - '-SNAPSHOT' + '.0' + if (isSnapshot) { + version += "-SNAPSHOT" + } +} sourceCompatibility = 1.8