1
1
mirror of https://github.com/primer/css.git synced 2024-11-27 17:52:45 +03:00

clean up release scripts

This commit is contained in:
Shawn Allen 2017-07-27 13:26:21 -07:00
parent 477945e5a0
commit 7525bcbc27
3 changed files with 20 additions and 12 deletions

View File

@ -1,8 +1,11 @@
#!/bin/bash
set -e
echo "📦 Publishing latest release..."
script/notify pending
$(dirname $0)/notify pending
# note: try-publish should exit cleanly if it detects a duplicate
# published version
lerna exec -- $(pwd)/script/try-publish
script/notify success
$(npm bin)/lerna exec -- $(pwd)/script/try-publish
$(dirname $0)/notify success

View File

@ -6,7 +6,6 @@ PATH=$(npm bin):$PATH
package=primer-css
npm_tag=rc
log=/tmp/rc.log
# get the version we're publishing as a release candidate
local_version=$(jq -r .version modules/$package/package.json)
@ -53,13 +52,15 @@ for module_dir in $module_dirs; do
echo "$module@$module_version => $module_next_version"
# "upgrade" to the most recent RC version so that
# `npm version prerelease` can increment automatically
npm version --no-git --quiet "$module_next_version" >> $log
npm version --no-git --quiet "$module_next_version"
popd > /dev/null
done
# publish all the things!
script/notify pending
$(dirname $0)/notify pending
# note: this should NOT fail, so --bail=true applies
lerna exec -- npm publish --tag=$npm_tag
script/notify success
$(dirname $0)/notify success

View File

@ -1,10 +1,14 @@
#!/bin/bash
set -e
echo "🐦 Publishing PR (canary) release..."
args=$@
npm_tag=pr
PATH=$(npm bin):$PATH
echo "🐦 Publishing PR release to dist-tag '$npm_tag'..."
# script/notify pending
lerna publish --npm-tag=$npm_tag --canary --no-git $args
script/notify success
lerna publish --npm-tag=pr --canary --no-git --yes
$(dirname $0)/notify success
# FIXME remove this before merging; just for testing
$(dirname $0)/notify-slack