mirror of
https://github.com/primer/css.git
synced 2024-11-23 20:38:58 +03:00
simplify travis deployment config w/deploy script
This commit is contained in:
parent
d9b3997c52
commit
c09bf292c1
26
.travis.yml
26
.travis.yml
@ -22,31 +22,7 @@ before_deploy:
|
||||
deploy:
|
||||
# publish canary releases on all branches *except* master and release-*
|
||||
- provider: script
|
||||
script: script/release-pr --yes
|
||||
skip_cleanup: true
|
||||
on:
|
||||
all_branches: true
|
||||
tags: false
|
||||
|
||||
# publish release candidates on release branches
|
||||
- provider: script
|
||||
script: script/release-candidate --yes
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: release-*
|
||||
tags: false
|
||||
|
||||
# publish "final" releases on master
|
||||
- provider: script
|
||||
script: script/release --yes
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: master
|
||||
tags: false
|
||||
|
||||
# lastly, deploy the docs site with whatever was published
|
||||
- provider: script
|
||||
script: script/deploy-docs
|
||||
script: script/deploy --yes
|
||||
skip_cleanup: true
|
||||
on:
|
||||
all_branches: true
|
||||
|
19
script/deploy
Executable file
19
script/deploy
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
branch=$(git symbolic-ref --short HEAD)
|
||||
echo "[deploy] branch = '$branch'"
|
||||
|
||||
if [[ "$@" = "--dry-run" ]]; then
|
||||
args="--skip-git --skip-npm"
|
||||
else
|
||||
args=$@
|
||||
fi
|
||||
|
||||
if [[ "$branch" = master ]]; then
|
||||
script/release $args
|
||||
elif [[ "$branch" =~ ^release- ]]; then
|
||||
script/release-candidate $args
|
||||
else
|
||||
script/release-pr $args
|
||||
fi
|
@ -1,12 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$@" = "--dry-run" ]]; then
|
||||
publish_args="--skip-git --skip-npm"
|
||||
else
|
||||
publish_args=$@
|
||||
fi
|
||||
|
||||
echo "🦜 Publishing canary release..."
|
||||
npx lerna publish --canary --exact --npm-tag=rc $publish_args
|
||||
|
||||
|
@ -1,11 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
branch="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
|
||||
|
||||
if [[ ! "$branch" =~ ^(master|release-) ]]; then
|
||||
echo "🐦 Publishing PR (canary) release..."
|
||||
npx lerna publish --canary --exact --npm-tag=pr $@
|
||||
else
|
||||
echo "Skipping PR release because '$branch' is master or release"
|
||||
fi
|
||||
echo "🐦 Publishing PR (canary) release..."
|
||||
npx lerna publish --canary --exact --npm-tag=pr $@
|
||||
|
Loading…
Reference in New Issue
Block a user