Skip to content

Commit

Permalink
Make sure the update-dependencies script runs cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Dec 2, 2024
1 parent 07ee736 commit 9b12572
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ dev_maven.install(
],
fail_if_repin_required = True,
fetch_sources = True,
lock_file = "//:contrib_rules_jvm_tests_install.json",
)
use_repo(
dev_maven,
Expand Down
Binary file modified java/private/contrib_rules_jvm_deps.zip
Binary file not shown.
21 changes: 6 additions & 15 deletions tools/update-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
#!/usr/bin/env bash
set -eufo pipefail

go mod tidy
# Update the Java bits
REPIN=1 bazel run @contrib_rules_jvm_deps//:pin
REPIN=1 bazel run @contrib_rules_jvm_tests//:pin
bazel run //tools:freeze-deps

# Work around https://github.com/bazelbuild/bazel-gazelle/issues/999
# Ideally we would delete the below block and replace it with this commented command:
#bazel run //:gazelle_go -- update-repos \
# -from_file=go.mod \
# -prune \
# -to_macro "third_party/go/repositories.bzl%go_deps"
GO_DEPS_FILE="third_party/go/repositories.bzl"
bazel run //:gazelle -- update-repos -from_file=go.mod -prune -to_macro "${GO_DEPS_FILE}%go_deps"
sed '/^$/d' "$GO_DEPS_FILE" >"${GO_DEPS_FILE}.new"
mv "${GO_DEPS_FILE}.new" "$GO_DEPS_FILE"
# And now the Go bits
bazel run @io_bazel_rules_go//go -- mod tidy
bazel run //:buildifier


REPIN=1 bazel run @contrib_rules_jvm_tests//:pin
./tools/freeze-deps.py

./tools/format.sh

0 comments on commit 9b12572

Please sign in to comment.