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:
38
38
- ' Full stack production tests'
39
39
- ' Test'
40
40
- ' Publish'
41
+ - ' Snapshot'
41
42
42
43
jobs :
43
44
include :
83
84
script :
84
85
- ./gradlew ship
85
86
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 {
27
27
if (travis_defined_version != null ) {
28
28
version = travis_defined_version
29
29
}
30
+
31
+ ext. isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
30
32
}
31
33
32
34
def publishedProjects = subprojects. findAll { it. name != ' java-quickstart' }
@@ -127,7 +129,9 @@ configure(publishedProjects) {
127
129
}
128
130
repositories {
129
131
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
131
135
credentials {
132
136
username System . getenv(' MAVEN_CENTRAL_USERNAME' )
133
137
password System . getenv(' MAVEN_CENTRAL_PASSWORD' )
You can’t perform that action at this time.
0 commit comments