Skip to content

Commit

Permalink
Make sure to exit publish script with correct code (#10310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored and Timer committed Jan 28, 2020
1 parent ee9ccc8 commit 6a88ec1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions publish-release.sh
Expand Up @@ -18,13 +18,23 @@ 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

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

0 comments on commit 6a88ec1

Please sign in to comment.