Skip to content

Commit

Permalink
Add Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jun 11, 2024
1 parent 4053029 commit ed547ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,21 @@ use_repo(gvm, "graalvm_toolchains")

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

# DO NOT UPDATE the jq version, this is used to verify compatibility with old versions.
# DO NOT UPDATE the jq versions, they are used to verify compatibility with old and new versions.
http_file(
name = "jq_linux_amd64",
executable = True,
integrity = "sha256-xrOn19PntwxvUbcGo7kL0BgzhGxU0yyjLwAn8AIm/20=",
urls = ["https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux64"],
)

http_file(
name = "jq_linux_arm64",
executable = True,
integrity = "sha256-TdLYoGYd8LIvG7mh+YMPBrbzuPfZEhGh7118TwaotKU=",
urls = ["https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-arm64"],
)

http_file(
name = "jq_macos_amd64",
executable = True,
Expand Down
10 changes: 9 additions & 1 deletion scripts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ filegroup(
}),
)

filegroup(
name = "jq_windows",
srcs = select({
"@platforms//cpu:arm64": ["@jq_windows_arm64//file"],
"@platforms//cpu:x86_64": ["@jq_windows_amd64//file"],
}),
)

filegroup(
name = "jq",
srcs = select({
"@platforms//os:linux": ["@jq_linux_amd64//file"],
"@platforms//os:macos": [":jq_macos"],
"@platforms//os:windows": ["@jq_windows_amd64//file"],
"@platforms//os:windows": [":jq_windows"],
}),
)

Expand Down

0 comments on commit ed547ab

Please sign in to comment.