Skip to content

Commit cc02f23

Browse files
authored
Build snapshot build by default with the same version as OpenSearch. (#58)
Signed-off-by: dblock <dblock@amazon.com>
1 parent 4f30425 commit cc02f23

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
repository: 'opensearch-project/OpenSearch'
3333
path: OpenSearch
34-
ref: 'main'
34+
ref: '1.x'
3535
- name: Build OpenSearch
3636
working-directory: ./OpenSearch
3737
run: ./gradlew publishToMavenLocal

build.gradle

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -146,8 +156,6 @@ task javadocJar(type: Jar) {
146156
from javadoc.destinationDir
147157
}
148158

149-
version '1.1.0.0'
150-
151159
publishing {
152160
publications {
153161
shadow(MavenPublication) {

0 commit comments

Comments
 (0)