release.sh 799 B

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