Skip to content

Commit 0a53f37

Browse files
committed
travis: fix skipping tagged releases
When building a PR, TRAVIS_BRANCH refers to the *target branch*. Therefore, if a PR targets `master`, and `master` happened to be tagged, we skipped the build by mistake. Fix this by using TRAVIS_PULL_REQUEST_BRANCH (i.e. the *source branch*) when available, falling back to TRAVIS_BRANCH (i.e. for CI builds, also known as "push builds"). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d112b3f commit 0a53f37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if test true = "$TRAVIS"
44
then
55
# We are running within Travis CI
6-
CI_BRANCH="$TRAVIS_BRANCH"
6+
CI_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
77
CI_COMMIT="$TRAVIS_COMMIT"
88
CI_JOB_ID="$TRAVIS_JOB_ID"
99
CI_JOB_NUMBER="$TRAVIS_JOB_NUMBER"

0 commit comments

Comments
 (0)