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.
13 lines
605 B
13 lines
605 B
#!/usr/bin/env bash
|
|
|
|
if [ -z "$NPM_CONFIG_REGISTRY" ]
|
|
then
|
|
echo "No custom registry defined..."
|
|
else
|
|
echo "Creating custom registry configurations..."
|
|
echo "registry \"$NPM_CONFIG_REGISTRY\""
|
|
echo "registry \"$NPM_CONFIG_REGISTRY\"" >> .npmrc
|
|
echo "registry \"$NPM_CONFIG_REGISTRY\"" >> .yarnrc
|
|
echo "Replacing static yarn registry references in yarn.lock... BUGFIX... revisit with yarn 2+... https://github.com/yarnpkg/yarn/issues/3330"
|
|
find . -name yarn.lock -exec sed -i "s#https://registry.yarnpkg.com#`awk '$1 == "registry" { gsub(/"/,""); print $NF}' .yarnrc`#g" {} \;
|
|
fi
|