An ebook/comic library service and web client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
605 B

  1. #!/usr/bin/env bash
  2. if [ -z "$NPM_CONFIG_REGISTRY" ]
  3. then
  4. echo "No custom registry defined..."
  5. else
  6. echo "Creating custom registry configurations..."
  7. echo "registry \"$NPM_CONFIG_REGISTRY\""
  8. echo "registry \"$NPM_CONFIG_REGISTRY\"" >> .npmrc
  9. echo "registry \"$NPM_CONFIG_REGISTRY\"" >> .yarnrc
  10. echo "Replacing static yarn registry references in yarn.lock... BUGFIX... revisit with yarn 2+... https://github.com/yarnpkg/yarn/issues/3330"
  11. find . -name yarn.lock -exec sed -i "s#https://registry.yarnpkg.com#`awk '$1 == "registry" { gsub(/"/,""); print $NF}' .yarnrc`#g" {} \;
  12. fi