remove old npm scope

This commit is contained in:
zramsay 2023-09-22 17:11:31 -04:00
parent e0b5318ebe
commit 10bb4ccf65
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Usage: build-npm-package-local-dependencies.sh <registry-url> <publish-with-this-version> # Usage: build-npm-package-local-dependencies.sh <registry-url> <publish-with-this-version>
# Runs build-npm-package.sh after first fixing up yarn.lock to use a local # Runs build-npm-package.sh after first fixing up yarn.lock to use a local
# npm registry for all packages in a specific scope (currently @cerc-io, @lirewine and @muknsys) # npm registry for all packages in a specific scope (currently @cerc-io and @lirewine)
if [ -n "$CERC_SCRIPT_DEBUG" ]; then if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
@ -18,7 +18,7 @@ set -e
local_npm_registry_url=$1 local_npm_registry_url=$1
package_publish_version=$2 package_publish_version=$2
# If we need to handle an additional scope, add it to the list below: # If we need to handle an additional scope, add it to the list below:
npm_scopes_to_handle=("@cerc-io" "@lirewine" "@muknsys") npm_scopes_to_handle=("@cerc-io" "@lirewine")
for npm_scope_for_local in ${npm_scopes_to_handle[@]} for npm_scope_for_local in ${npm_scopes_to_handle[@]}
do do
# We need to configure the local registry # We need to configure the local registry

View File

@ -24,7 +24,6 @@ package_name=$( cat package.json | jq -r .name )
local_npm_registry_url=$1 local_npm_registry_url=$1
npm config set @cerc-io:registry ${local_npm_registry_url} npm config set @cerc-io:registry ${local_npm_registry_url}
npm config set @lirewine:registry ${local_npm_registry_url} npm config set @lirewine:registry ${local_npm_registry_url}
npm config set @muknsys:registry ${local_npm_registry_url}
# Workaround bug in npm unpublish where it needs the url to be of the form //<foo> and not http://<foo> # Workaround bug in npm unpublish where it needs the url to be of the form //<foo> and not http://<foo>
local_npm_registry_url_fixed=$( echo ${local_npm_registry_url} | sed -e 's/^http[s]\{0,1\}://') local_npm_registry_url_fixed=$( echo ${local_npm_registry_url} | sed -e 's/^http[s]\{0,1\}://')
npm config set -- ${local_npm_registry_url_fixed}:_authToken ${CERC_NPM_AUTH_TOKEN} npm config set -- ${local_npm_registry_url_fixed}:_authToken ${CERC_NPM_AUTH_TOKEN}