mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-20 16:53:33 +00:00
Warn about 2FA
This commit is contained in:
parent
26f11dd695
commit
8bbc5c4bb6
1 changed files with 12 additions and 0 deletions
12
bin/release
12
bin/release
|
|
@ -20,16 +20,28 @@ fi
|
|||
if [[ ! "$(npm get registry)" =~ https://registry\.npmjs\.(com|org)/? ]]; then
|
||||
echo "Found unexpected npm registry: $(npm get registry)"
|
||||
echo "Run this to fix:"
|
||||
echo ""
|
||||
echo "npm set registry https://registry.npmjs.org"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! npm whoami > /dev/null; then
|
||||
echo "Not authenticated with npm. First do:"
|
||||
echo ""
|
||||
echo "npm login"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(npm profile get --json | jq .tfa.mode -r)" == "auth-and-writes" ]; then
|
||||
echo "Two-factor auth is enabled for publishing. This doesn't work well with lerna."
|
||||
echo "Temporarily switch to authentication-only 2FA using the link below:"
|
||||
echo ""
|
||||
echo "https://www.npmjs.com/settings/$(npm whoami)/tfa"
|
||||
echo ""
|
||||
echo "You can re-enable 2FA for publishing using the same link after this release is complete."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -o xtrace
|
||||
|
||||
# Update README before publishing `uppy`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue