Skip to main content

Module release

Module release 

Source
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 asset from a SHA256SUMS body. Each line is <hex>␠␠<name> (or single-space); we match the file name and return its hash. Returns None if the asset isn’t listed.
fetch_host_binary
Download the release binary for triple, verified against the release’s SHA256SUMS, and return its bytes. Errors name the URL tried and point at --binary as 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.