From 6a88ec1852d646a3261c372a106881da4f267f73 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 28 Jan 2020 13:03:32 -0600 Subject: [PATCH] Make sure to exit publish script with correct code (#10310) --- publish-release.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/publish-release.sh b/publish-release.sh index a1e6e92e94..157a762004 100755 --- a/publish-release.sh +++ b/publish-release.sh @@ -18,6 +18,11 @@ if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary" yarn run lerna publish from-git --npm-tag canary --yes + + # Make sure to exit script with code 1 if publish failed + if [[ ! $? -eq 0 ]];then + exit 1; + fi else echo "Did not publish canary" fi @@ -25,6 +30,11 @@ fi if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then echo "Publishing stable" yarn run lerna publish from-git --yes + + # Make sure to exit script with code 1 if publish failed + if [[ ! $? -eq 0 ]];then + exit 1; + fi else echo "Did not publish stable" fi