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§
Functions§
- fetch_
binary - Download
assetintodir, unpack it, and return the path tobin_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
Nonerather than failing — a shallow clone legitimately has no tags, and the caller can still report that precisely. - version_
of - Strip a leading
vfor display. Deliberately does no other normalisation — tool version strings are frequently not semver and must stay opaque.