From 82b484c08b445f72938033f1d1b97a7ccc1ae2d2 Mon Sep 17 00:00:00 2001 From: Prev Wong Date: Mon, 15 Nov 2021 19:03:36 +0800 Subject: [PATCH] chore: update publish script --- scripts/publish.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 55f41b965..11727d495 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -24,18 +24,6 @@ fi echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc -if [[ $(git describe --exact-match 2> /dev/null || :) =~ -beta ]]; -then - echo "Publishing packages" - yarn run lerna publish from-git --yes # publish latest tagged commit - - if [[ ! $? -eq 0 ]];then - exit 1; - fi -else - echo "Did not publish packages" -fi - if [[ $(git describe --exact-match 2> /dev/null || :) =~ -alpha ]]; then echo "Publishing alpha" @@ -46,5 +34,10 @@ then exit 1; fi else - echo "Did not publish alpha" + echo "Publishing packages" + yarn run lerna publish from-git --yes # publish latest tagged commit + + if [[ ! $? -eq 0 ]];then + exit 1; + fi fi