From 114595bb011cb9a0a2c4a271faabe6e33a18e313 Mon Sep 17 00:00:00 2001 From: Roman Mandeleil Date: Fri, 27 Mar 2015 12:38:05 +0300 Subject: [PATCH] Fix branch name env var --- ethereumj-core/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethereumj-core/build.gradle b/ethereumj-core/build.gradle index 5d4710f3..802c5663 100644 --- a/ethereumj-core/build.gradle +++ b/ethereumj-core/build.gradle @@ -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' @@ -156,8 +157,7 @@ artifactory { artifactoryPublish.onlyIf { (!pullRequest || pullRequest == 'false') && - project.version.endsWith('-SNAPSHOT') && (buildEnv.branch.startsWith('master')) - + project.version.endsWith('-SNAPSHOT') && (branchName.startsWith('master')) } bintray { @@ -187,7 +187,7 @@ install { task publish { - println "publishing if master current branch: " + buildEnv.branch + println "publishing if master current branch: " + branchName description = "Publishes snapshots to oss.jfrog.org and releases to Bintray/JCenter" dependsOn artifactoryPublish, bintrayUpload }