refactor(dev-infra): move existing env-stamp command into subfolder (#38656)

Moves the existing `ng-dev release env-stamp` command into a
subfolder so that the staging/publish tool can have its own
dedicated folder (without being polluted by the env-stamp logic).

Every subcommand should be in its own folder.

PR Close #38656
This commit is contained in:
Paul Gschwendtner 2020-09-09 14:53:13 +02:00 committed by Alex Rickabaugh
parent 8b01d42e5d
commit 964ac1542a
3 changed files with 10 additions and 8 deletions

View File

@ -3,16 +3,13 @@ load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "release",
srcs = glob([
"*.ts",
"**/*.ts",
]),
module_name = "@angular/dev-infra-private/release",
visibility = ["//dev-infra:__subpackages__"],
deps = [
"//dev-infra/utils",
"@npm//@types/node",
"@npm//@types/shelljs",
"@npm//@types/yargs",
"@npm//shelljs",
"@npm//yargs",
],
)

View File

@ -6,12 +6,17 @@
* found in the LICENSE file at https://angular.io/license
*/
import * as yargs from 'yargs';
import {buildEnvStamp} from './env-stamp';
import {buildEnvStamp} from './stamping/env-stamp';
/** Build the parser for the release commands. */
export function buildReleaseParser(localYargs: yargs.Argv) {
return localYargs.help().strict().demandCommand().command(
'build-env-stamp', 'Build the environment stamping information', {}, () => buildEnvStamp());
return localYargs.help()
.strict()
.demandCommand()
.command(
'build-env-stamp', 'Build the environment stamping information', {},
() => buildEnvStamp());
}
if (require.main === module) {

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {exec as _exec} from '../utils/shelljs';
import {exec as _exec} from '../../utils/shelljs';
/**
* Log the environment variables expected by bazel for stamping.