25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. if [ -z "${NPM_TOKEN}" ]; then
  3. echo "Need to set NPM_TOKEN env variable to release node modules"
  4. exit 1
  5. fi
  6. if [ $# -eq 0 ]; then
  7. echo "No arguments provided"
  8. exit 1
  9. fi
  10. touch ~/.npmrc
  11. grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc || echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
  12. for project in $@
  13. do
  14. pushd ${project}
  15. yarn publish --non-interactive
  16. pwd
  17. popd
  18. done