Skip to content

Commit

Permalink
Use standard snapshot build settings and OpenSearch 1.x. (opensearch-…
Browse files Browse the repository at this point in the history
…project#49)

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Aug 16, 2021
1 parent 97522de commit 0ed7ee1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
ref: 'main'
ref: '1.x'
path: OpenSearch
- name: Build OpenSearch
working-directory: ./OpenSearch
Expand All @@ -39,11 +39,11 @@ jobs:
# job-scheduler
- name: Build and Test
run: |
./gradlew build -Dbuild.snapshot=false
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal -Dbuild.snapshot=false
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
Expand Down
19 changes: 8 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ plugins {
id 'java-library'
}

ext {
opensearchVersion = "${version}"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.java-rest-test'
Expand Down Expand Up @@ -84,17 +79,19 @@ testClusters.javaRestTest {
testDistribution = 'INTEG_TEST'
}

ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

allprojects {
group = 'org.opensearch'
version = "${opensearchVersion}.0"

apply from: "$rootDir/build-tools/repositories.gradle"

boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"));
if (snapshot) {
version = opensearch_version - '-SNAPSHOT' + '.0'
if (isSnapshot) {
version += "-SNAPSHOT"
}

apply from: "$rootDir/build-tools/repositories.gradle"

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
}
Expand Down

0 comments on commit 0ed7ee1

Please sign in to comment.