Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ stages:
- 'Full stack production tests'
- 'Test'
- 'Publish'
- 'Snapshot'

jobs:
include:
Expand Down Expand Up @@ -83,3 +84,9 @@ jobs:
script:
- ./gradlew ship
after_success: skip

- stage: 'Snapshot'
if: env(SNAPSHOT) = true and type = api
script:
- TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship
after_success: skip
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down Expand Up @@ -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')
Expand Down