Introduces a new command for `ng-dev release`, so that the NPM dist tag can be set for all configured NPM packages. This command can be useful in case a manual tag needs to be set, but it is primarily used by the release tooling when a new stable version is cut, and when the previous patch branch needs to be set as LTS version through a `v{major}-lts` dist tag. It is necessary to have this as a command so that the release tool can execute it for old branches where other packages might have been configured. This is similar to the separate `ng-dev build` command that we created. Note that we also added logic for spawning a process conveniently with different "console output" modes. This will be useful for other command invocations in the release tool and it's generally better than directly using native `child_process` as that one doesn't log to the dev-infra debug log file. PR Close #38656
45 lines
1007 B
Python
45 lines
1007 B
Python
load("@npm_bazel_typescript//:index.bzl", "ts_library")
|
|
load("//tools:defaults.bzl", "jasmine_node_test")
|
|
|
|
ts_library(
|
|
name = "set-dist-tag",
|
|
srcs = glob(
|
|
[
|
|
"**/*.ts",
|
|
],
|
|
exclude = ["*.spec.ts"],
|
|
),
|
|
module_name = "@angular/dev-infra-private/release/set-dist-tag",
|
|
visibility = ["//dev-infra:__subpackages__"],
|
|
deps = [
|
|
"//dev-infra/release/config",
|
|
"//dev-infra/release/versioning",
|
|
"//dev-infra/utils",
|
|
"@npm//@types/node",
|
|
"@npm//@types/semver",
|
|
"@npm//@types/yargs",
|
|
"@npm//ora",
|
|
"@npm//semver",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_lib",
|
|
srcs = glob([
|
|
"*.spec.ts",
|
|
]),
|
|
deps = [
|
|
":set-dist-tag",
|
|
"//dev-infra/release/config",
|
|
"//dev-infra/release/versioning",
|
|
"//dev-infra/utils/testing",
|
|
"@npm//@types/jasmine",
|
|
"@npm//@types/node",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "test",
|
|
deps = [":test_lib"],
|
|
)
|