Skip to content

Commit

Permalink
Merge pull request #568 from AndreKurait/MavenTagRemoveSnapshot
Browse files Browse the repository at this point in the history
Add snapshot publish and snapshot version property
  • Loading branch information
AndreKurait authored Apr 9, 2024
2 parents 8c13003 + 5279b50 commit 95ff189
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Download Repo Tar
run: |
wget https://github.com/opensearch-project/opensearch-migrations/archive/refs/tags/${{ steps.get_data.outputs.version }}.tar.gz -O artifacts.tar.gz
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository -Dbuild.snapshot=false && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
- name: Draft a release
uses: softprops/action-gh-release@v2
with:
Expand Down
31 changes: 29 additions & 2 deletions TrafficCapture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,43 @@ subprojects {
from components.java

group = 'org.opensearch.migrations.trafficcapture'
version = '0.1.0-SNAPSHOT'
version = '0.1.0'

// support -Dbuild.snapshot=false, but default to true
if (System.getProperty("build.snapshot", "true") == "true") {
version += "-SNAPSHOT"
}


pom {
name = project.name
description = 'Everything opensearch migrations'
url = 'http://github.com/opensearch-project/opensearch-migrations'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = "OpenSearch"
url = "https://github.com/opensearch-project/opensearch-migrations"
}
}
}

// Suppress POM metadata warnings for test fixtures
suppressPomMetadataWarningsFor('testFixturesApiElements')
suppressPomMetadataWarningsFor('testFixturesRuntimeElements')
}
}
repositories {
maven { url = "${rootProject.buildDir}/repository"}
maven {
url = "${rootProject.buildDir}/repository"
url "https://aws.oss.sonatype.org/content/repositories/snapshots"
name = 'staging'
}
}
}
Expand Down

0 comments on commit 95ff189

Please sign in to comment.