Publish one if building on master branch
This commit is contained in:
parent
96fb4f875d
commit
0599ba0be2
|
@ -136,6 +136,7 @@ jacocoTestReport {
|
|||
def bintrayUsername = project.hasProperty('bintrayUser') ? project.bintrayUser : ''
|
||||
def bintrayPassword = project.hasProperty('bintrayKey') ? project.bintrayKey : ''
|
||||
def pullRequest = System.getenv('TRAVIS_PULL_REQUEST')
|
||||
def branchName = System.getenv('TRAVIS_BRANCH')
|
||||
|
||||
artifactory {
|
||||
contextUrl = 'http://oss.jfrog.org/artifactory'
|
||||
|
@ -155,7 +156,8 @@ artifactory {
|
|||
}
|
||||
|
||||
artifactoryPublish.onlyIf {
|
||||
(!pullRequest || pullRequest == 'false') && project.version.endsWith('-SNAPSHOT')
|
||||
(!pullRequest || pullRequest == 'false') &&
|
||||
project.version.endsWith('-SNAPSHOT') && (branchName.equals('master'))
|
||||
}
|
||||
|
||||
bintray {
|
||||
|
|
Loading…
Reference in New Issue