Files
website/scripts/publish
T
2015-11-16 21:46:20 -08:00

24 lines
413 B
Bash
Executable File

#!/bin/bash
function die {
echo $*
exit 1
}
read -p "Major, minor, patch? " VERSION_TYPE
if [[ "$VERSION_TYPE" == "" ]]; then
exit 1
fi
npm version "$VERSION_TYPE" || die "Invalid version type: $VERSION_TYPE"
npm publish
git push \
&& git checkout production \
&& git rebase master \
&& git push \
&& git checkout master \
|| die "Could not publish changes"
grunt clean build