release.sh 385 B

1234567891011121314151617181920
  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. # run tests
  10. npm test 2>/dev/null
  11. npm version $VERSION --message "release: $VERSION"
  12. # publish
  13. git push origin refs/tags/v$VERSION
  14. git push
  15. npm publish
  16. fi