Skip to content

Commit

Permalink
chore(deps): upgrade to newest bsdtar (#940)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored Sep 18, 2024
1 parent eb575d5 commit 3b6a3d5
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions lib/private/tar_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,36 @@ BSDTAR_PLATFORMS = {

BSDTAR_PREBUILT = {
"darwin_amd64": (
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.4-3/tar_darwin_amd64",
"e872943518f946a4a73106c1fa811c0211cb74a6e6d673f5a2ffbfaf40806ec0",
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.5/tar_darwin_amd64",
"6c7752869833c5cd4cf9728f90afd37f6665d7f9e06a4fbfdeb0fa41267575cf",
),
"darwin_arm64": (
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.4-3/tar_darwin_arm64",
"81d992eeefb519421dc18db63fce51f7fef7204b94e17e9b490af7699b565ff1",
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.5/tar_darwin_arm64",
"1718c23919bae478ed13c682a341e389de6ba4396220fc8e75a7f0e5d6024019",
),
"linux_amd64": (
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.4-3/tar_linux_amd64",
"9dba82030199b2660086e458fa6481cf73089ee5c47d216e647bb2a6b0fae792",
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.5/tar_linux_amd64",
"b8c492a51fb9e4c59dfa71b3c62191210c48280b98c2a88f7cef8ba973a9ad39",
),
"linux_arm64": (
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.4-3/tar_linux_arm64",
"105f91ad792fce13030bd249d8f9a14fd7ceaf908e1caeb99685b0b1fac44be2",
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.5/tar_linux_arm64",
"aa760c25a5445320bb3cde06e60c99ebc95fb29f330af0212bd099dd24e1cc54",
),
"windows_amd64": (
"https://github.com/libarchive/libarchive/releases/download/v3.7.4/libarchive-v3.7.4-amd64.zip",
"7ced6865d5e22e1dab0c3f3d65094d946ae505ec4e8db026f82c9e1c413f3c59",
"https://github.com/aspect-build/bsdtar-prebuilt/releases/download/v3.7.5/tar_windows_amd64.exe",
"80c109b9477ed44e9f8626cd9d8a635c8761c4506030c91f46b289798c7a22b6",
),
}

def _bsdtar_binary_repo(rctx):
(url, sha256) = BSDTAR_PREBUILT[rctx.attr.platform]
if rctx.attr.platform.startswith("windows"):
rctx.download_and_extract(
url = url,
type = "zip",
sha256 = sha256,
)
binary = "libarchive/bin/bsdtar.exe"
else:
rctx.download(
url = url,
output = "tar",
executable = True,
sha256 = sha256,
)
binary = "tar"
binary = "tar.exe" if rctx.attr.platform.startswith("windows") else "tar"
rctx.download(
url = url,
output = binary,
executable = True,
sha256 = sha256,
)

rctx.file("BUILD.bazel", """\
# @generated by @aspect_bazel_lib//lib/private:tar_toolchain.bzl
Expand Down

0 comments on commit 3b6a3d5

Please sign in to comment.