mirror of
https://github.com/primer/css.git
synced 2024-11-30 11:17:05 +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
|
#!/bin/bash
|
||||||
set -e
|
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
|
echo "No status provided!" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
echo "📦 Publishing latest release..."
|
echo "📦 Publishing latest release..."
|
||||||
script/notify pending
|
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
|
script/notify success
|
||||||
|
@ -60,5 +60,6 @@ done
|
|||||||
|
|
||||||
# publish all the things!
|
# publish all the things!
|
||||||
script/notify pending
|
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
|
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