Skip to content

Commit f340a29

Browse files
committed
split publish task into publish and publishAsk
1 parent e7c3c6b commit f340a29

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/pub.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,16 @@ resetMaster() {
8181
}
8282

8383
npmPublish() {
84+
git checkout $TAG_NAME || exit 1
85+
npm run lerna publish from-git || exit 1
86+
}
87+
88+
npmPublishAsk() {
8489
while true; do
8590
read -p "Last chance to bail out. Publish $RELEASE_BRANCH to npm? Y/n " yn
8691
echo
8792
case $yn in
88-
[Yy]* ) git checkout $TAG_NAME && npm run lerna publish from-git; break;;
93+
[Yy]* ) npmPublish; break;;
8994
[Nn]* ) exit;;
9095
* ) echo "Please answer 'Y' or 'n'.";;
9196
esac
@@ -123,6 +128,6 @@ gitTag
123128
removeIgnoredFiles
124129
pushToOrigin
125130
resetMaster
126-
npmPublish
131+
npmPublishAsk
127132
handlePR
128133
goodbye

0 commit comments

Comments
 (0)