release.sh 798 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. set -e
  2. if [[ -z $1 ]]; then
  3. echo "Enter new version: "
  4. read VERSION
  5. else
  6. VERSION=$1
  7. fi
  8. read -p "Releasing $VERSION - are you sure? (y/n) " -n 1 -r
  9. echo
  10. if [[ $REPLY =~ ^[Yy]$ ]]; then
  11. echo "Releasing $VERSION ..."
  12. export SAUCE_BUILD_ID=$VERSION:`date +"%s"`
  13. npm run lint
  14. npm run flow
  15. npm run test:cover
  16. npm run test:e2e
  17. npm run test:ssr
  18. npm run test:sauce
  19. # build
  20. VERSION=$VERSION npm run build
  21. # update packages
  22. cd packages/vue-template-compiler
  23. npm version $VERSION
  24. npm publish
  25. cd -
  26. cd packages/vue-server-renderer
  27. npm version $VERSION
  28. npm publish
  29. cd -
  30. # commit
  31. git add -A
  32. git commit -m "[build] $VERSION"
  33. npm version $VERSION --message "[release] $VERSION"
  34. # publish
  35. git push origin refs/tags/v$VERSION
  36. git push
  37. npm publish
  38. fi