From 089caa1147cf41339854f2eb878b9589e65d9763 Mon Sep 17 00:00:00 2001 From: Jae Kim Date: Thu, 19 Aug 2021 13:42:14 -0700 Subject: [PATCH 1/4] add snapshot publish to travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 93c025e23..d5d1d7fde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ stages: - 'Full stack production tests' - 'Test' - 'Publish' + - 'Snapshot' jobs: include: @@ -83,3 +84,9 @@ jobs: script: - ./gradlew ship after_success: skip + + - stage: 'Snapshot' + if: env(SNAPSHOT) = true and type = api + script: + - TRAVIS_TAG=3-SNAPSHOT ./gradlew ship + after_success: skip From 73145f7faa03b7b017c1283cf3687e6b96dacae5 Mon Sep 17 00:00:00 2001 From: Jae Kim <45045038+jaeopt@users.noreply.github.com> Date: Thu, 19 Aug 2021 14:14:16 -0700 Subject: [PATCH 2/4] temp fix for branch permission --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d5d1d7fde..c767fa843 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ cache: branches: only: - master + - jae/snapshot-release - /^\d+\.\d+\.(\d|[x])+(-SNAPSHOT|-alpha|-beta)?\d*$/ # trigger builds on tags which are semantically versioned to ship the SDK. after_success: - ./gradlew coveralls uploadArchives --console plain From 5b8e1c43bd7093c5f5df38ae8000afe614c9bb1b Mon Sep 17 00:00:00 2001 From: Jae Kim Date: Thu, 19 Aug 2021 15:57:38 -0700 Subject: [PATCH 3/4] add maven url for snapshot --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 31608bcbf..e0e14fa9d 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,8 @@ allprojects { if (travis_defined_version != null) { version = travis_defined_version } + + ext.isReleaseVersion = !version.endsWith("SNAPSHOT") } def publishedProjects = subprojects.findAll { it.name != 'java-quickstart' } @@ -127,7 +129,9 @@ configure(publishedProjects) { } repositories { maven { - url "https://oss.sonatype.org/service/local/staging/deploy/maven2" + def releaseUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2" + def snapshotUrl = "https://oss.sonatype.org/content/repositories/snapshots" + url = isReleaseVersion ? releaseUrl : snapshotUrl credentials { username System.getenv('MAVEN_CENTRAL_USERNAME') password System.getenv('MAVEN_CENTRAL_PASSWORD') From 9c57401476ecf16a528c960ba6313900409d3152 Mon Sep 17 00:00:00 2001 From: Jae Kim Date: Thu, 19 Aug 2021 17:47:43 -0700 Subject: [PATCH 4/4] remove temp branch from travis --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c767fa843..2735eacaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ cache: branches: only: - master - - jae/snapshot-release - /^\d+\.\d+\.(\d|[x])+(-SNAPSHOT|-alpha|-beta)?\d*$/ # trigger builds on tags which are semantically versioned to ship the SDK. after_success: - ./gradlew coveralls uploadArchives --console plain @@ -89,5 +88,5 @@ jobs: - stage: 'Snapshot' if: env(SNAPSHOT) = true and type = api script: - - TRAVIS_TAG=3-SNAPSHOT ./gradlew ship + - TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship after_success: skip