From acfa0647b7f04408c37654e1c8ee3675d620b849 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 26 May 2021 10:01:44 -0700 Subject: [PATCH] fix(dev-infra): build with stamping for release builds (#42354) `ng-dev release build` should always build with version stamping rather than snapshot stamping. PR Close #42354 --- dev-infra/ng-dev.js | 10 ++-------- dev-infra/release/build/cli.ts | 19 ++++++------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/dev-infra/ng-dev.js b/dev-infra/ng-dev.js index ecab957b60..2846b3f33c 100755 --- a/dev-infra/ng-dev.js +++ b/dev-infra/ng-dev.js @@ -5180,23 +5180,17 @@ function buildReleaseOutput(stampForRelease = false) { */ /** Yargs command builder for configuring the `ng-dev release build` command. */ function builder$7(argv) { - return argv - .option('json', { + return argv.option('json', { type: 'boolean', description: 'Whether the built packages should be printed to stdout as JSON.', default: false, - }) - .option('stampForRelease', { - type: 'boolean', - description: 'Whether the built packages should be stamped for release.', - default: false, }); } /** Yargs command handler for building a release. */ function handler$7(args) { return tslib.__awaiter(this, void 0, void 0, function* () { const { npmPackages } = getReleaseConfig(); - let builtPackages = yield buildReleaseOutput(args.stampForRelease); + let builtPackages = yield buildReleaseOutput(true); // If package building failed, print an error and exit with an error code. if (builtPackages === null) { error(red(` ✘ Could not build release output. Please check output above.`)); diff --git a/dev-infra/release/build/cli.ts b/dev-infra/release/build/cli.ts index 9b281c76bc..6125dad1a9 100644 --- a/dev-infra/release/build/cli.ts +++ b/dev-infra/release/build/cli.ts @@ -17,28 +17,21 @@ import {buildReleaseOutput} from './index'; /** Command line options for building a release. */ export interface ReleaseBuildOptions { json: boolean; - stampForRelease: boolean; } /** Yargs command builder for configuring the `ng-dev release build` command. */ function builder(argv: Argv): Argv { - return argv - .option('json', { - type: 'boolean', - description: 'Whether the built packages should be printed to stdout as JSON.', - default: false, - }) - .option('stampForRelease', { - type: 'boolean', - description: 'Whether the built packages should be stamped for release.', - default: false, - }); + return argv.option('json', { + type: 'boolean', + description: 'Whether the built packages should be printed to stdout as JSON.', + default: false, + }); } /** Yargs command handler for building a release. */ async function handler(args: Arguments) { const {npmPackages} = getReleaseConfig(); - let builtPackages = await buildReleaseOutput(args.stampForRelease); + let builtPackages = await buildReleaseOutput(true); // If package building failed, print an error and exit with an error code. if (builtPackages === null) {