Skip to content

Commit 9f272f2

Browse files
redsun82Copilot
andcommitted
Use consistent x64/arm64 arch suffixes for ripunzip sha attrs
Rename the sha256 attributes (and matching canonical_ids) to a single scheme across all platforms: <os>_x64 / <os>_arm64. This replaces the inconsistent sha256_linux (no suffix), sha256_macos_intel and sha256_macos_arm. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6404a7a-35d7-4294-b3b6-9231ca15ef25
1 parent 343a8db commit 9f272f2

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

MODULE.bazel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archi
326326
# go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s
327327
ripunzip_archive(
328328
name = "ripunzip",
329-
sha256_linux = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de",
330-
sha256_linux_arm = "a282740ef376ff8dc0de3c589b7457598db15cc045b7daa688f15531612e0bbe",
331-
sha256_macos_arm = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9",
332-
sha256_macos_intel = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a",
333-
sha256_windows = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e",
329+
sha256_linux_arm64 = "a282740ef376ff8dc0de3c589b7457598db15cc045b7daa688f15531612e0bbe",
330+
sha256_linux_x64 = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de",
331+
sha256_macos_arm64 = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9",
332+
sha256_macos_x64 = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a",
333+
sha256_windows_x64 = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e",
334334
version = "2.0.4",
335335
)
336336

misc/ripunzip/ripunzip.bzl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ def _ripunzip_archive_impl(repository_ctx):
66
arch = repository_ctx.os.arch
77
if arch == "aarch64":
88
deb_arch = "arm64"
9-
sha256 = repository_ctx.attr.sha256_linux_arm
10-
canonical_id = "ripunzip-linux-arm"
9+
sha256 = repository_ctx.attr.sha256_linux_arm64
10+
canonical_id = "ripunzip-linux-arm64"
1111
else:
1212
deb_arch = "amd64"
13-
sha256 = repository_ctx.attr.sha256_linux
14-
canonical_id = "ripunzip-linux"
13+
sha256 = repository_ctx.attr.sha256_linux_x64
14+
canonical_id = "ripunzip-linux-x64"
1515

1616
# ripunzip only provides a deb package for Linux: we fish the binary out of it
1717
# a deb archive contains a data.tar.xz one which contains the files to be installed under usr/bin
@@ -29,20 +29,20 @@ def _ripunzip_archive_impl(repository_ctx):
2929
elif "windows" in repository_ctx.os.name:
3030
repository_ctx.download_and_extract(
3131
url = "%s/ripunzip_v%s_x86_64-pc-windows-msvc.zip" % (url_prefix, version),
32-
canonical_id = "ripunzip-windows",
33-
sha256 = repository_ctx.attr.sha256_windows,
32+
canonical_id = "ripunzip-windows-x64",
33+
sha256 = repository_ctx.attr.sha256_windows_x64,
3434
output = "bin",
3535
)
3636
elif "mac os" in repository_ctx.os.name:
3737
arch = repository_ctx.os.arch
3838
if arch == "x86_64":
3939
suffix = "x86_64-apple-darwin"
40-
sha256 = repository_ctx.attr.sha256_macos_intel
41-
canonical_id = "ripunzip-macos-intel"
40+
sha256 = repository_ctx.attr.sha256_macos_x64
41+
canonical_id = "ripunzip-macos-x64"
4242
elif arch == "aarch64":
4343
suffix = "aarch64-apple-darwin"
44-
sha256 = repository_ctx.attr.sha256_macos_arm
45-
canonical_id = "ripunzip-macos-arm"
44+
sha256 = repository_ctx.attr.sha256_macos_arm64
45+
canonical_id = "ripunzip-macos-arm64"
4646
else:
4747
fail("Unsupported macOS architecture: %s" % arch)
4848
repository_ctx.download_and_extract(
@@ -61,10 +61,10 @@ ripunzip_archive = repository_rule(
6161
doc = "Downloads a prebuilt ripunzip binary for the host platform from https://github.com/GoogleChrome/ripunzip/releases",
6262
attrs = {
6363
"version": attr.string(mandatory = True),
64-
"sha256_linux": attr.string(mandatory = True),
65-
"sha256_linux_arm": attr.string(mandatory = True),
66-
"sha256_windows": attr.string(mandatory = True),
67-
"sha256_macos_intel": attr.string(mandatory = True),
68-
"sha256_macos_arm": attr.string(mandatory = True),
64+
"sha256_linux_x64": attr.string(mandatory = True),
65+
"sha256_linux_arm64": attr.string(mandatory = True),
66+
"sha256_windows_x64": attr.string(mandatory = True),
67+
"sha256_macos_x64": attr.string(mandatory = True),
68+
"sha256_macos_arm64": attr.string(mandatory = True),
6969
},
7070
)

0 commit comments

Comments
 (0)