Fix publish only on master
This commit is contained in:
parent
1e7217ea3d
commit
1fb2e0af0c
|
@ -136,7 +136,6 @@ 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'
|
||||
|
@ -156,9 +155,9 @@ artifactory {
|
|||
}
|
||||
|
||||
artifactoryPublish.onlyIf {
|
||||
// (!pullRequest || pullRequest == 'false') &&
|
||||
// project.version.endsWith('-SNAPSHOT') && (branchName == 'master')
|
||||
false
|
||||
(!pullRequest || pullRequest == 'false') &&
|
||||
project.version.endsWith('-SNAPSHOT') && (buildEnv.branch.startsWith('master'))
|
||||
|
||||
}
|
||||
|
||||
bintray {
|
||||
|
@ -188,7 +187,7 @@ install {
|
|||
|
||||
task publish {
|
||||
|
||||
println "publishing if master current branch: " + branchName
|
||||
println "publishing if master current branch: " + buildEnv.branch
|
||||
description = "Publishes snapshots to oss.jfrog.org and releases to Bintray/JCenter"
|
||||
dependsOn artifactoryPublish, bintrayUpload
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue