1
1
mirror of https://github.com/primer/css.git synced 2024-09-20 21:28:20 +03:00

swap TRAVIS_BRANCH and TRAVIS_PULL_REQUEST_BRANCH

This commit is contained in:
Shawn Allen 2017-07-25 14:16:42 -07:00
parent 73008f8bb3
commit ee51b3f010

View File

@ -19,16 +19,17 @@ echo "🐛 script/cibuild"
# the presence of $TRAVIS_PULL_REQUEST_BRANCH tells us
# whether this is a pull request
if [[ "$event" = "pull_request" ]]; then
target_branch=$TRAVIS_PULL_REQUEST_BRANCH
upstream_branch=$branch
branch=$TRAVIS_PULL_REQUEST_BRANCH
# if the *source* branch begins with "release"
if [[ "$branch" =~ ^release ]]; then
script/release-candidate $args
# otherwise, if the *target* branch is dev
elif [[ "$target_branch" = "dev" ]]; then
elif [[ "$upstream_branch" = "dev" ]]; then
script/release-pr $args
else
echo "⚠️ This is a PR, but '$branch' isn't a release branch"
echo " and '$target_branch' isn't a recognized target branch."
echo " and '$upstream_branch' isn't a recognized upstream branch."
exit 1
fi
elif [[ "$branch" = "master" ]]; then