1
1
mirror of https://github.com/primer/css.git synced 2024-11-13 08:04:16 +03:00
css/script/deploy

23 lines
653 B
Plaintext
Raw Normal View History

2017-07-08 01:57:33 +03:00
#!/bin/sh
set -e
2017-07-08 02:00:22 +03:00
if [[ $DEPLOY != true ]]; then
echo "Skipping deploy."
exit 1
fi
2017-07-08 01:57:33 +03:00
# always publish a canary release if this is a PR build
if [[ $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST != false ]]; then
2017-07-08 02:00:22 +03:00
echo "🐦 Publishing canary version..."
2017-07-08 01:57:33 +03:00
echo npm run release-canary
# merges to dev build a release candidate
elif [[ $TRAVIS_BRANCH = release ]]; then
echo "👌 Publishing release candidate..."
echo npm run release-candidate
elif [[ $TRAVIS_BRANCH = master ]]; then
echo "📦 Publishing latest release!"
echo npm run release
else
echo "⚠️ This isn't a PR and '${TRAVIS_BRANCH}' isn't a release branch."
exit 1
fi