Skip to content

Commit

Permalink
refactor: move Wombat registry to reusable constant
Browse files Browse the repository at this point in the history
Pure refactor that just pulls the Wombat registry into a separate string constant to be re-used across scripts.
  • Loading branch information
dgp1130 authored and alan-agius4 committed Jul 23, 2020
1 parent f9996de commit 49ed081
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions lib/registries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

/** URL to Wombat NPM registry proxy. */
export const wombat = 'https://wombat-dressing-room.appspot.com';
4 changes: 2 additions & 2 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { logging, tags } from '@angular-devkit/core';
import { spawnSync } from 'child_process';
import * as semver from 'semver';
import { packages } from '../lib/packages';
import { wombat } from '../lib/registries';
import build from './build';


export interface PublishArgs {
tag?: string;
branchCheck?: boolean;
Expand Down Expand Up @@ -118,7 +118,7 @@ export default async function (args: PublishArgs, logger: logging.Logger) {
}

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

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

0 comments on commit 49ed081

Please sign in to comment.