release.sh 840 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. npm run lint
  13. npm run flow
  14. npm run test:cover
  15. npm run test:e2e
  16. npm run test:ssr
  17. if [[ -z $SKIP_SAUCE ]]; then
  18. export SAUCE_BUILD_ID=$VERSION:`date +"%s"`
  19. npm run test:sauce
  20. fi
  21. # build
  22. VERSION=$VERSION npm run build
  23. # update packages
  24. cd packages/vue-template-compiler
  25. npm version $VERSION
  26. npm publish
  27. cd -
  28. cd packages/vue-server-renderer
  29. npm version $VERSION
  30. npm publish
  31. cd -
  32. # commit
  33. git add -A
  34. git commit -m "[build] $VERSION"
  35. npm version $VERSION --message "[release] $VERSION"
  36. # publish
  37. git push origin refs/tags/v$VERSION
  38. git push
  39. npm publish
  40. fi