Expand description
Fetch the matching prebuilt host binary from the GitHub release.
host add and upgrade need a git-ark binary built for the host’s triple.
Rather than make the operator cross-compile one or download it by hand, we
pull the asset for the client’s own version straight from the release,
verify its SHA-256 against the release’s SHA256SUMS, and stream it to the
host — so the host never needs a toolchain, and host and client always run
the same version. Release assets are public, so no token is involved.
Functions§
- asset_
name - Release asset file name for a host triple, e.g.
git-ark-x86_64-unknown-linux-musl. - expected_
sha256 - The expected SHA-256 (lowercase hex) for
assetfrom aSHA256SUMSbody. Each line is<hex>␠␠<name>(or single-space); we match the file name and return its hash. ReturnsNoneif the asset isn’t listed. - fetch_
host_ binary - Download the release binary for
triple, verified against the release’sSHA256SUMS, and return its bytes. Errors name the URL tried and point at--binaryas the escape hatch when no matching release asset exists. - sha256_
hex - Lowercase-hex SHA-256 of
bytes. - version
- This client’s version — the release tag we fetch host binaries from.