Skip to content

Commit 274cb3c

Browse files
committed
build: sync-all-modules.sh now explicitly uses the local Bazel binary from node_modules and runs pnpm commands silently
1 parent 4f33c8c commit 274cb3c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/sync-all-modules.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/bin/bash
22
set -e
33

4+
# Set the BAZEL environment variable to ensure the correct version is used.
5+
export BAZEL="$(git rev-parse --show-toplevel)/node_modules/.bin/bazel"
6+
47
echo "Starting synchronization of all Bazel modules..."
58

69
# Update the root lockfile. This is needed for the sync-module-bazel command to work.
7-
bazel mod deps --lockfile_mode=update
10+
"$BAZEL" mod deps --lockfile_mode=update
811

912
# Find and store all MODULE.bazel directories
1013
module_dirs=()
@@ -19,11 +22,11 @@ for dir in "${module_dirs[@]}"; do
1922
if [[ -f "$dir/package.json" ]] && grep -q '"ng-dev":' "$dir/package.json"; then
2023
(
2124
cd "$dir"
22-
pnpm ng-dev misc sync-module-bazel
25+
pnpm -s ng-dev misc sync-module-bazel
2326
)
2427

2528
# Update the root lockfile. This is needed for the sync-module-bazel command to work due to circular dependencies.
26-
bazel mod deps --lockfile_mode=update
29+
"$BAZEL" mod deps --lockfile_mode=update
2730
fi
2831
done
2932

@@ -33,7 +36,7 @@ for dir in "${module_dirs[@]}"; do
3336
echo "Processing (Lockfile): $dir"
3437
(
3538
cd "$dir"
36-
bazel mod deps --lockfile_mode=update
39+
"$BAZEL" mod deps --lockfile_mode=update
3740
)
3841
done
3942

0 commit comments

Comments
 (0)