mirror of
https://github.com/primer/css.git
synced 2024-11-30 11:17:05 +03:00
29 lines
689 B
Bash
Executable File
29 lines
689 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# --yes gets passed in by .travis.yml,
|
|
# which makes this easier to test locally
|
|
args=$@
|
|
|
|
branch=$TRAVIS_BRANCH
|
|
|
|
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
|
|
target_branch=$TRAVIS_PULL_REQUEST_BRANCH
|
|
if [[ "$target_branch" =~ ^release ]]; then
|
|
script/notify pending
|
|
script/release-candidate $args
|
|
script/notify success
|
|
elif [[ "$target_branch" = "dev" ]]; then
|
|
script/notify pending
|
|
script/release-pr $args
|
|
script/notify success
|
|
fi
|
|
elif [[ "$branch" = "master" ]]; then
|
|
script/notify pending
|
|
script/release $args
|
|
script/notify success
|
|
else
|
|
echo "⚠️ This isn't a PR and '$branch' isn't a release branch."
|
|
exit 1
|
|
fi
|