From cbafcb5988a29a504504be466026eef8b22cde75 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Tue, 10 Sep 2024 16:20:09 -0400 Subject: [PATCH] [workspace] Upgrade bazelisk to latest release v1.21.0 (#21888) --- third_party/com_github_bazelbuild_bazelisk/bazelisk.py | 5 ++++- tools/workspace/bazelisk/repository.bzl | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/third_party/com_github_bazelbuild_bazelisk/bazelisk.py b/third_party/com_github_bazelbuild_bazelisk/bazelisk.py index fa956ffbc2aa..5a55b2d1b5cb 100755 --- a/third_party/com_github_bazelbuild_bazelisk/bazelisk.py +++ b/third_party/com_github_bazelbuild_bazelisk/bazelisk.py @@ -113,7 +113,10 @@ def decide_which_bazel_version_to_use(): bazelversion_path = os.path.join(workspace_root, ".bazelversion") if os.path.exists(bazelversion_path): with open(bazelversion_path, "r") as f: - return f.read().strip() + for ln in f.readlines(): + ln = ln.strip() + if ln: + return ln return "latest" diff --git a/tools/workspace/bazelisk/repository.bzl b/tools/workspace/bazelisk/repository.bzl index 426b1599b686..9e58f0c623a9 100644 --- a/tools/workspace/bazelisk/repository.bzl +++ b/tools/workspace/bazelisk/repository.bzl @@ -15,8 +15,8 @@ def bazelisk_repository( bazel-drake/external/bazelisk/LICENSE \\ bazel-drake/external/bazelisk/bazelisk.py """, - commit = "v1.20.0", - sha256 = "3c2303d45562cf7a9bc64ad41b670f38c2634bf8ba5b3acffa2997577955b3e0", # noqa + commit = "v1.21.0", + sha256 = "0b7b5b74cb5d79ba814b4413e59adb826f3891e1b14dfd1485eae2078f531253", # noqa build_file = ":package.BUILD.bazel", patches = [ ":patches/pull494.patch",