Make sure to exit publish script with correct code (#10310)
This commit is contained in:
parent
ee9ccc84cc
commit
6a88ec1852
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue