publish-node.sh 592 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. NODE_VERSIONS=( "4.0.0" "5.0.0" "6.0.0" "7.0.0" "8.0.0" "9.0.0")
  3. # Makes sure nvm is installed.
  4. if ! which nvm > /dev/null; then
  5. rm -rf ~/.nvm/ &&\
  6. git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
  7. source ~/.nvm/nvm.sh
  8. fi
  9. for i in "${NODE_VERSIONS[@]}"; do
  10. # Installs and use the correct version of node
  11. nvm install $i
  12. nvm use $i
  13. # build, package and publish for the current package version
  14. npm install nan
  15. npm install aws-sdk
  16. npm install node-pre-gyp
  17. ./node_modules/.bin/node-pre-gyp clean configure build package publish
  18. done