From 78eaed352dd3c92070358d5c427a4b78ea846de8 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:13:34 +0000 Subject: [PATCH] build: `sync-all-modules.sh` now explicitly uses the local Bazel binary from `node_modules` and runs `pnpm` commands silently --- tools/sync-all-modules.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/sync-all-modules.sh b/tools/sync-all-modules.sh index 35f9d512e..6edcbe081 100755 --- a/tools/sync-all-modules.sh +++ b/tools/sync-all-modules.sh @@ -1,10 +1,13 @@ #!/bin/bash set -e +# Set the BAZEL environment variable to ensure the correct version is used. +export BAZEL="$(git rev-parse --show-toplevel)/node_modules/.bin/bazel" + echo "Starting synchronization of all Bazel modules..." # Update the root lockfile. This is needed for the sync-module-bazel command to work. -bazel mod deps --lockfile_mode=update +"$BAZEL" mod deps --lockfile_mode=update # Find and store all MODULE.bazel directories module_dirs=() @@ -19,11 +22,11 @@ for dir in "${module_dirs[@]}"; do if [[ -f "$dir/package.json" ]] && grep -q '"ng-dev":' "$dir/package.json"; then ( cd "$dir" - pnpm ng-dev misc sync-module-bazel + pnpm -s ng-dev misc sync-module-bazel ) # Update the root lockfile. This is needed for the sync-module-bazel command to work due to circular dependencies. - bazel mod deps --lockfile_mode=update + "$BAZEL" mod deps --lockfile_mode=update fi done @@ -33,7 +36,7 @@ for dir in "${module_dirs[@]}"; do echo "Processing (Lockfile): $dir" ( cd "$dir" - bazel mod deps --lockfile_mode=update + "$BAZEL" mod deps --lockfile_mode=update ) done