From 7af1dfa0227ba39c0b2844fbaf3597f87de65dc2 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Thu, 20 Jul 2017 17:34:17 -0700 Subject: [PATCH] fix branch variable setting --- script/cibuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/cibuild b/script/cibuild index 6ec6f4ec..bdb64a9b 100755 --- a/script/cibuild +++ b/script/cibuild @@ -6,7 +6,11 @@ set -e args=$@ event="$TRAVIS_EVENT_TYPE" -branch="${TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_BRANCH}}" +branch="$TRAVIS_BRANCH" +# use $TRAVIS_PULL_REQUEST_BRANCH if this is a PR +if [[ "$event" = "pull_request" ]]; then + branch="$TRAVIS_PULL_REQUEST_BRANCH" +fi echo "==== CI env ====" echo "event: $event"