vue-material/build/release.sh
2016-11-14 19:20:11 -02:00

33 lines
588 B
Bash

# Based on Vue.js Release file
# https://github.com/vuejs/vue/blob/dev/build/release.sh
set -e
if [[ -z $1 ]]; then
echo "Enter new version: "
read VERSION
else
VERSION=$1
fi
read -p "Releasing $VERSION - are you sure? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Releasing $VERSION ..."
npm run lint
# build
VERSION=$VERSION npm run build
# commit
git add -A
git commit -m "[build] $VERSION"
npm version $VERSION --message "[release] $VERSION"
# publish
git push origin refs/tags/v$VERSION
git push
npm run deploy-docs
npm publish
fi