mirror of
https://github.com/primer/css.git
synced 2024-11-11 04:00:54 +03:00
29 lines
764 B
Bash
Executable File
29 lines
764 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# --yes gets passed in by .travis.yml,
|
|
# which makes this easier to test locally
|
|
args=$@
|
|
|
|
echo "TRAVIS_ env vars:"
|
|
echo "EVENT_TYPE: $TRAVIS_EVENT_TYPE"
|
|
echo "BRANCH: $TRAVIS_BRANCH"
|
|
echo "PULL_REQUEST_BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
|
exit
|
|
|
|
# always publish a pr release if this is a PR build
|
|
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
|
|
script/release-pr $args
|
|
# merges to dev build a release candidate
|
|
elif [[ "$TRAVIS_BRANCH" =~ "^release-" ]]; then
|
|
script/release-candidate $args
|
|
# publish a release when we merge to master
|
|
elif [[ "$TRAVIS_BRANCH" = "master" ]]; then
|
|
script/release $args
|
|
else
|
|
echo "⚠️ This isn't a PR and '$TRAVIS_BRANCH' isn't a release branch."
|
|
exit 1
|
|
fi
|
|
|
|
script/notify
|