1
1
mirror of https://github.com/primer/css.git synced 2024-11-24 05:06:04 +03:00
css/script/release-pr
2019-01-04 11:30:57 -08:00

17 lines
419 B
Bash
Executable File

#!/bin/bash
set -e
branch=$TRAVIS_PULL_REQUEST_BRANCH
if [[ "$branch" = "master" ]]; then
reason="this is the master branch"
elif [[ "$branch" =~ ^release- ]]; then
reason="this is a release branch"
else
echo "🐦 Publishing PR (canary) release..."
npx lerna publish --canary --exact --npm-tag=pr $@
exit 0
fi
echo "Skipping PR release because $reason (TRAVIS_PULL_REQUEST_BRANCH = '$branch')"