Skip to content

Commit

Permalink
Build snapshot build by default with the same version as OpenSearch. (#…
Browse files Browse the repository at this point in the history
…58)

Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock authored and Aditya Jindal committed Sep 9, 2021
1 parent 8f8f611 commit f851b8e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
<<<<<<< HEAD
ref: '1.0'
=======
ref: '1.x'
>>>>>>> cc02f23... Build snapshot build by default with the same version as OpenSearch. (#58)
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal
Expand Down
18 changes: 11 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
buildscript {
ext {
opensearch_group = "org.opensearch"
<<<<<<< HEAD
opensearch_version = System.getProperty("opensearch.version", "1.0.0")
=======
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
>>>>>>> 401802d... Using 1.1 snapshot version for OpenSearch (#57)
kotlin_version = System.getProperty("kotlin.version", "1.4.32")
}

Expand Down Expand Up @@ -48,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

Expand Down Expand Up @@ -150,8 +156,6 @@ task javadocJar(type: Jar) {
from javadoc.destinationDir
}

version '1.0.0.0'

publishing {
publications {
shadow(MavenPublication) {
Expand Down

0 comments on commit f851b8e

Please sign in to comment.