From 1fb2e0af0cd0c166817d51c63bbd91731c084a38 Mon Sep 17 00:00:00 2001 From: Roman Mandeleil Date: Fri, 27 Mar 2015 12:34:41 +0300 Subject: [PATCH] Fix publish only on master --- ethereumj-core/build.gradle | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ethereumj-core/build.gradle b/ethereumj-core/build.gradle index 786f21b4..5d4710f3 100644 --- a/ethereumj-core/build.gradle +++ b/ethereumj-core/build.gradle @@ -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 }