1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 01:04:04 +03:00

Merge branch 'shawnbot/release-fixes' into shawnbot/no-pr-build

This commit is contained in:
Shawn Allen 2017-07-25 13:04:16 -07:00
commit 680635ac8c
4 changed files with 21 additions and 3 deletions

View File

@ -1,7 +1,10 @@
#!/bin/bash
set -e
if [[ $# -lt 1 ]]; then
if [[ "$CI" != "true" ]]; then
echo "(notify bailing: not in CI)"
exit
elif [[ $# -lt 1 ]]; then
echo "No status provided!" >&2
exit 1
fi

View File

@ -2,5 +2,7 @@
set -e
echo "📦 Publishing latest release..."
script/notify pending
lerna exec -- npm publish
# note: try-publish should exit cleanly if it detects a duplicate
# published version
lerna exec -- $(pwd)/script/try-publish
script/notify success

View File

@ -60,5 +60,6 @@ done
# publish all the things!
script/notify pending
lerna exec --bail=false -- npm publish --tag=$npm_tag
# note: this should NOT fail, so --bail=true applies
lerna exec -- npm publish --tag=$npm_tag
script/notify success

12
script/try-publish Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
# pwd
package=$(jq .name package.json)
version=$(jq .version package.json)
published=$(npm info "$package@$version")
if [[ "$version" = "$published" ]]; then
echo "⚠️ $package@$version is already published!"
else
echo "📦 npm publish: $package@$version"
npm publish $@
fi