mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
build: add the ignore all rc files flag when running bazel info
Due to a bug in bazel we need to ignore all of the rc files when running bazel info commands
(cherry picked from commit 9ace7d7a0d)
This commit is contained in:
parent
4043ec5bdd
commit
96bb4c6ae3
5 changed files with 15 additions and 5 deletions
|
|
@ -5,7 +5,9 @@ set -ex
|
|||
# so that it can be consumed by the Angular extension for local development.
|
||||
# Usage: ./build.sh /path/to/vscode-ng-language-service
|
||||
|
||||
readonly bazel_bin=$(pnpm --silent bazel info bazel-bin)
|
||||
# TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
|
||||
# commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
|
||||
readonly bazel_bin=$(pnpm --silent bazel --ignore_all_rc_files info bazel-bin)
|
||||
readonly extension_repo="$1"
|
||||
|
||||
if [[ -z "${extension_repo}" ]]; then
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ export function buildAngularInMemoryWebApiPackage(destDir: string): void {
|
|||
// Ensure the output directory is available.
|
||||
exec(`mkdir -p ${destDir}`);
|
||||
|
||||
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
|
||||
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
|
||||
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
|
||||
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
|
||||
|
||||
// Copy artifacts to `destDir`, so they can be easier persisted on CI and used by non-bazel
|
||||
// scripts/tests.
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ function buildReleasePackages(
|
|||
// List of targets to build. e.g. "packages/core:npm_package", or "packages/forms:npm_package".
|
||||
const targets = exec(queryPackagesCmd, true).split(/\r?\n/).concat(additionalTargets);
|
||||
const packageNames = getPackageNamesOfTargets(targets);
|
||||
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
|
||||
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
|
||||
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
|
||||
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
|
||||
const getBazelOutputPath = (pkgName: string) => {
|
||||
return pkgName === 'language-server'
|
||||
? join(bazelBinPath, 'vscode-ng-language-service/server/npm_package')
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ export function buildZoneJsPackage(destDir: string): void {
|
|||
// Ensure the output directory is available.
|
||||
exec(`mkdir -p ${destDir}`);
|
||||
|
||||
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
|
||||
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
|
||||
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
|
||||
const bazelBinPath = exec(`${bazelCmd} --ignore_all_rc_files info bazel-bin`, true);
|
||||
|
||||
// Copy artifacts to `destDir`, so they can be easier persisted on CI and used by non-bazel
|
||||
// scripts/tests.
|
||||
|
|
|
|||
|
|
@ -67,8 +67,10 @@ async function main(packageName: string) {
|
|||
git.run(['clone', '--depth=1', `https://github.com/${snapshotRepoName}.git`, tmpDir]);
|
||||
console.info(`--> Cloned snapshot repo.`);
|
||||
|
||||
// TODO: Remove --ignore_all_rc_files flag once a repository can be loaded in bazelrc during info
|
||||
// commands again. See https://github.com/bazelbuild/bazel/issues/25145 for more context.
|
||||
const bazelBinDir = childProcess
|
||||
.spawnSync(bazel, ['info', 'bazel-bin'], {
|
||||
.spawnSync(bazel, ['--ignore_all_rc_files', 'info', 'bazel-bin'], {
|
||||
shell: true,
|
||||
encoding: 'utf8',
|
||||
stdio: ['pipe', 'pipe', 'inherit'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue