Skip to main content

Module backfill

Module backfill 

Source
Expand description

Backfill history from published release binaries.

A new adopter’s first chart is empty, and an empty chart persuades nobody. Rather than rebuilding a project at a hundred historical commits — hours of compute, and impossible for anyone without a reproducible build — this downloads the binaries the project already published and measures those. Minutes, not hours, and it works for projects whose old commits no longer build at all.

Network and archive handling shell out to curl and tar/unzip for the same reason crate::notes shells out to git: proxies, CA bundles and credential helpers are already solved there, and the dependency tree stays small.

Structs§

Asset
Release

Functions§

fetch_binary
Download asset into dir, unpack it, and return the path to bin_name.
in_git_repo
Whether the current directory is inside a git work tree.
list_releases
Releases for repo (“owner/name”), newest first, pre-releases excluded.
pick_asset
release_dir_name
A filesystem-safe, collision-free directory name for a release.
tag_commit
Resolve a release tag to the commit it points at, if the tag is available locally. Returns None rather than failing — a shallow clone legitimately has no tags, and the caller can still report that precisely.
version_of
Strip a leading v for display. Deliberately does no other normalisation — tool version strings are frequently not semver and must stay opaque.