Skip to content

Commit 235d270

Browse files
adityaj1107VachaShahdblock
authored
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 <vachshah@amazon.com> * Build snapshot build by default with the same version as OpenSearch. (#58) Signed-off-by: dblock <dblock@amazon.com> * Update build.gradle to reflect 1.1.0.0 version Co-authored-by: Vacha <vachshah@amazon.com> Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
1 parent 0119874 commit 235d270

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jobs:
3434
ref: '1.x'
3535
- name: Build OpenSearch
3636
working-directory: ./OpenSearch
37-
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false
37+
run: ./gradlew publishToMavenLocal
3838

3939
# common-utils
4040
- name: Build and Test
4141
run: |
42-
./gradlew build -Dopensearch.version=1.1.0
42+
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
4343
4444
- name: Publish to Maven Local
4545
run: |
46-
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0
46+
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
4747
4848
- name: Upload Coverage Report
4949
uses: codecov/codecov-action@v1

build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
buildscript {
1313
ext {
1414
opensearch_group = "org.opensearch"
15-
opensearch_version = System.getProperty("opensearch.version", "1.1.0")
15+
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
1616
kotlin_version = System.getProperty("kotlin.version", "1.4.32")
1717
}
1818

@@ -44,7 +44,17 @@ repositories {
4444
jcenter()
4545
}
4646

47-
group 'org.opensearch.commons'
47+
ext {
48+
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
49+
}
50+
51+
allprojects {
52+
group 'org.opensearch.commons'
53+
version = opensearch_version - '-SNAPSHOT' + '.0'
54+
if (isSnapshot) {
55+
version += "-SNAPSHOT"
56+
}
57+
}
4858

4959
sourceCompatibility = 1.8
5060

0 commit comments

Comments
 (0)