mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-14 03:41:07 +00:00
33 lines
588 B
Bash
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
|