publish.sh 372 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # get current version
  3. VERSION=$(node -e "console.log(require('./package.json').version)")
  4. # Build
  5. git checkout -b build
  6. node_modules/.bin/grunt
  7. git add dist -f
  8. git commit -m "build $VERSION"
  9. # Tag and push
  10. git tag $VERSION
  11. git push --tags git@github.com:proj4js/proj4js.git $VERSION
  12. # Publish
  13. npm publish
  14. # Cleanup
  15. git checkout master
  16. git branch -D build