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:
commit
680635ac8c
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
12
script/try-publish
Executable 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
|
Loading…
Reference in New Issue
Block a user