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
|
then
|
||||||
echo "Publishing canary"
|
echo "Publishing canary"
|
||||||
yarn run lerna publish from-git --npm-tag canary --yes
|
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
|
else
|
||||||
echo "Did not publish canary"
|
echo "Did not publish canary"
|
||||||
fi
|
fi
|
||||||
|
@ -25,6 +30,11 @@ fi
|
||||||
if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then
|
if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then
|
||||||
echo "Publishing stable"
|
echo "Publishing stable"
|
||||||
yarn run lerna publish from-git --yes
|
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
|
else
|
||||||
echo "Did not publish stable"
|
echo "Did not publish stable"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue