release.sh 473 B

1234567891011121314151617181920212223
  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. # build
  10. VERSION=$VERSION npm run dist
  11. # commit
  12. git add -A
  13. git commit -m "[build] $VERSION"
  14. npm version $VERSION --message "[release] $VERSION"
  15. # publish
  16. git push eleme refs/tags/v$VERSION
  17. git push eleme master
  18. npm publish --tag next
  19. fi