Update publish script to use read correctly

This commit is contained in:
Andrew Miner
2015-05-29 14:13:35 -07:00
parent f577e31e6c
commit ff4697f4b6
+7 -3
View File
@@ -1,15 +1,19 @@
#!/bin/bash
function die {
echo $*
exit 1
}
git checkout production \
&& git rebase master \
&& git push \
&& git checkout master
read VERSION_TYPE -p "Major, minor, patch? "
read -p "Major, minor, patch? " VERSION_TYPE
if [[ "$VERSION_TYPE" == "" ]]; then
exit 1
fi
npm version "$VERSION_TYPE"
npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE"
npm publish