Publish one if building on master branch

This commit is contained in:
Roman Mandeleil 2015-03-27 12:03:42 +03:00
parent 96fb4f875d
commit 0599ba0be2
1 changed files with 3 additions and 1 deletions

View File

@ -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 {