Update publish script to use read correctly
This commit is contained in:
+7
-3
@@ -1,15 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
function die {
|
||||||
|
echo $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
git checkout production \
|
git checkout production \
|
||||||
&& git rebase master \
|
&& git rebase master \
|
||||||
&& git push \
|
&& git push \
|
||||||
&& git checkout master
|
&& git checkout master
|
||||||
|
|
||||||
|
read -p "Major, minor, patch? " VERSION_TYPE
|
||||||
read VERSION_TYPE -p "Major, minor, patch? "
|
|
||||||
if [[ "$VERSION_TYPE" == "" ]]; then
|
if [[ "$VERSION_TYPE" == "" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm version "$VERSION_TYPE"
|
npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE"
|
||||||
npm publish
|
npm publish
|
||||||
|
|||||||
Reference in New Issue
Block a user