Skip to content

Commit

Permalink
build: default to wombat proxy for publishing
Browse files Browse the repository at this point in the history
If no --registry argument is provided when calling to publish
use the Wombat proxy.  Additionally, updates the release process
documentation to instruct usage of the Wombat proxy.
  • Loading branch information
josephperrott authored and mgechev committed Apr 8, 2020
1 parent 8c86914 commit 6ceafa5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
21 changes: 9 additions & 12 deletions docs/process/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,18 @@ git push upstream && git push upstream --tags
**This can ONLY be done by a Google employee.**
Log in to [NPM](https://npmjs.com/) to the `angular` account in order to
publish. This account is protected by two factor authentication (2FA).
Log in to the Wombat publishing service using your own github and google.com
account to publish. This enforces the loging is done using 2Factor auth.
Run `npm login`:
Run `npm login --registry https://wombat-dressing-room.appspot.com`:
1. For username, use `angular`.
1. For password, use the value stored [here](http://go/ng-npm-pass).
1. For email, use `[email protected]`.
1. For two-factor code, you'll need to set up the account.
* Use an authenticator app such as [Google Authenticator](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2).
* Add a new account and enter the text key from [here](http://go/ng-npm-2fa).
* The app will start showing two-factor codes, enter one into the
`npm login` prompt.
1. In the new browser tab, the registry app will ask you to connect with GitHub to create a token
1. After connecting with github, you will be redirected to create a token
1. Upon redirect, an auth token is added to your ~/.npmrc for the proxy
Once successfully logged in, it is time to publish.
After closing the tab, you have successfully logged in, it is time to publish.
**NOTE: After publishing, remove the token added to your `~/.npmrc` file to logout.**
### Publishing
Expand Down
6 changes: 3 additions & 3 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ export default async function (args: PublishArgs, logger: logging.Logger) {
if (args.tag) {
publishArgs.push('--tag', args.tag);
}
if (args.registry) {
publishArgs.push('--registry', args.registry);
}

// If no registry is provided, the wombat proxy should be used.
publishArgs.push('--registry', args.registry || 'https://wombat-dressing-room.appspot.com');

return _exec('npm', publishArgs, {
cwd: pkg.dist,
Expand Down

0 comments on commit 6ceafa5

Please sign in to comment.