1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 11:17:05 +03:00

clean up cibuild script, publish RCs on release-* branches

This commit is contained in:
Shawn Allen 2017-07-20 14:13:49 -07:00
parent 9b3e64f00f
commit cce5dea156

View File

@ -3,16 +3,16 @@ set -e
# --yes gets passed in by .travis.yml,
# which makes this easier to test locally
args=${@:1}
args=$@
# always publish a pr release if this is a PR build
if [[ $TRAVIS_EVENT_TYPE = pull_request ]]; then
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
script/release-pr ${args}
# merges to dev build a release candidate
elif [[ $TRAVIS_BRANCH = dev ]]; then
elif [[ "$TRAVIS_BRANCH" =~ "^release-" ]]; then
script/release-candidate ${args}
# publish a release when we merge to master
elif [[ $TRAVIS_BRANCH = master ]]; then
elif [[ "$TRAVIS_BRANCH" = "master" ]]; then
script/release ${args}
else
echo "⚠️ This isn't a PR and '${TRAVIS_BRANCH}' isn't a release branch."