From 2fbf26875173c6883de5f0390aafcdbc1562ca2d Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 11 Jun 2024 16:31:37 +0200 Subject: [PATCH] Add a jq version for arm64 All other versions are kept at the minimum supported version. --- MODULE.bazel | 7 +++++++ scripts/BUILD | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index b9ce01027c3027..bfa66a1a479150 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -341,6 +341,13 @@ http_file( urls = ["https://github.com/jqlang/jq/releases/download/jq-1.5/jq-osx-amd64"], ) +http_file( + name = "jq_macos_arm64", + executable = True, + integrity = "sha256-C75hnmY+DeLFUL4v4NJA0HZ5nW+KZStw+gSuqKg2Loo=", + urls = ["https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-arm64"], +) + http_file( name = "jq_windows_amd64", executable = True, diff --git a/scripts/BUILD b/scripts/BUILD index 6f872a4a8db817..3bf1fc32e5d5fb 100644 --- a/scripts/BUILD +++ b/scripts/BUILD @@ -40,11 +40,19 @@ sh_test( ], ) +filegroup( + name = "jq_macos", + srcs = select({ + "@platforms//cpu:arm64": ["@jq_macos_arm64//file"], + "@platforms//cpu:x86_64": ["@jq_macos_amd64//file"], + }), +) + filegroup( name = "jq", srcs = select({ "@platforms//os:linux": ["@jq_linux_amd64//file"], - "@platforms//os:macos": ["@jq_macos_amd64//file"], + "@platforms//os:macos": [":jq_macos"], "@platforms//os:windows": ["@jq_windows_amd64//file"], }), )