mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
Ensure the npm registry is used during "Publish" workflow (#4286)
Unset the `npm_config_registry` env var which yarn overwrites to the yarn registry, which we don't want since the `.npmrc` file that gets created is configured to the npm registry.
This commit is contained in:
25
lerna.json
25
lerna.json
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"packages": ["packages/*"],
|
"packages": ["packages/*"],
|
||||||
"command": {
|
"command": {
|
||||||
"publish": {
|
"publish": {
|
||||||
"npmClient": "npm",
|
"npmClient": "npm",
|
||||||
"allowBranch": ["master", "canary"],
|
"allowBranch": ["master"],
|
||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "independent"
|
"version": "independent"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
utils/publish-legacy.sh
vendored
4
utils/publish-legacy.sh
vendored
@@ -23,6 +23,6 @@ for tag in $tags; do
|
|||||||
npm_tag="--tag canary"
|
npm_tag="--tag canary"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running \`npm publish --registry=https://registry.npmjs.com $npm_tag\` in \"$(pwd)\""
|
echo "Running \`npm publish $npm_tag\` in \"$(pwd)\""
|
||||||
echo "DRY: npm publish --registry=https://registry.npmjs.com $npm_tag"
|
npm publish $npm_tag
|
||||||
done
|
done
|
||||||
|
|||||||
4
utils/publish.sh
vendored
4
utils/publish.sh
vendored
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# `yarn` overwrites this value to use the yarn registry, which we
|
||||||
|
# can't publish to. Unset so that the default npm registry is used.
|
||||||
|
unset npm_config_registry
|
||||||
|
|
||||||
__dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
__dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
echo "__dirname: ${__dirname}"
|
echo "__dirname: ${__dirname}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user