github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/public/libs/vue-1.0.24/build/release.sh (about) 1 set -e 2 echo "Enter release version: " 3 read VERSION 4 5 read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r 6 echo # (optional) move to a new line 7 if [[ $REPLY =~ ^[Yy]$ ]] 8 then 9 echo "Releasing $VERSION ..." 10 11 # lint and test 12 npm run lint 2>/dev/null 13 npm run unit 2>/dev/null 14 npm run cover 2>/dev/null 15 16 # build 17 VERSION=$VERSION npm run build 18 19 # e2e 20 npm run e2e 2>/dev/null 21 # sauce 22 npm run sauce-all 2>/dev/null 23 24 # commit 25 git add -A 26 git commit -m "[build] $VERSION" 27 npm version $VERSION --message "[release] $VERSION" 28 29 # publish 30 git push origin refs/tags/v$VERSION 31 git push 32 npm publish 33 fi