Skip to content

Commit

Permalink
Propagate command line args (if any) to the underlying bazel invocati…
Browse files Browse the repository at this point in the history
…on in `update_default_lock_file.sh`

Motivation is to allow running (some) Bazel tests on a `rules_java` presubmit. This is tricky because there is no simple way to override a dep in `MODULE.tools`. Plan is to use a fake registry and pass the appropriate `--registry=` flag(s). So, this requires propagating the flags while updating the tests' lock file.

PiperOrigin-RevId: 595339606
Change-Id: Ib1858eab29a7013a08ab1bebddf954e2f2f0a47a
  • Loading branch information
hvadehra authored and copybara-github committed Jan 3, 2024
1 parent f63910c commit 0684707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/tools/bzlmod/update_default_lock_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ function generate_lock_file() {
touch MODULE.bazel
bazel=$(rlocation io_bazel/src/bazel)

echo "Running: $bazel mod deps"
$bazel mod deps
echo "Running: $bazel mod deps $@"
$bazel mod deps "$@"
cp ./MODULE.bazel.lock $BUILD_WORKSPACE_DIRECTORY/src/test/tools/bzlmod/MODULE.bazel.lock
}

generate_lock_file
generate_lock_file "$@"

0 comments on commit 0684707

Please sign in to comment.