publish.sh 400 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # get current version
  3. VERSION=$(npm ls --json=true proj4js | grep version | awk '{ print $2}'| sed -e 's/^"//' -e 's/"$//')
  4. # Build
  5. git checkout -b build
  6. 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. jam publish
  15. # Cleanup
  16. git checkout master
  17. git branch -D build