File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ stages:
3838 - ' Full stack production tests'
3939 - ' Test'
4040 - ' Publish'
41+ - ' Snapshot'
4142
4243jobs :
4344 include :
8384 script :
8485 - ./gradlew ship
8586 after_success : skip
87+
88+ - stage : ' Snapshot'
89+ if : env(SNAPSHOT) = true and type = api
90+ script :
91+ - TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship
92+ after_success : skip
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ allprojects {
2727 if (travis_defined_version != null ) {
2828 version = travis_defined_version
2929 }
30+
31+ ext. isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
3032}
3133
3234def publishedProjects = subprojects. findAll { it. name != ' java-quickstart' }
@@ -127,7 +129,9 @@ configure(publishedProjects) {
127129 }
128130 repositories {
129131 maven {
130- url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
132+ def releaseUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
133+ def snapshotUrl = " https://oss.sonatype.org/content/repositories/snapshots"
134+ url = isReleaseVersion ? releaseUrl : snapshotUrl
131135 credentials {
132136 username System . getenv(' MAVEN_CENTRAL_USERNAME' )
133137 password System . getenv(' MAVEN_CENTRAL_PASSWORD' )
You can’t perform that action at this time.
0 commit comments