Expand description
Self-update: replace the running binary from the matching GitHub release.
The flow is: resolve the current host’s (os, arch, libc) tuple, fetch the
latest GitHub Releases tag, pick the asset whose name matches that tuple,
download and extract it (zip on Windows, tar.gz elsewhere), then atomically
swap it in over the current executable. check_update is a read-only
probe; update_interactive is the entry point the vct update
subcommand calls.
Submodules: github (Releases API + download), archive (extraction with
path-traversal guards), and platform (asset-name derivation and the
OS-specific binary swap).
Structs§
- GitHub
Asset - A single downloadable file attached to a
GitHubRelease. - GitHub
Release - A GitHub release, deserialized from the Releases API.
Functions§
- check_
update - Probes for a newer release without installing anything.
- extract_
semver_ version - Strips git metadata from a
BUILD_VERSIONstring, leaving the base semver. - perform_
force_ update - Installs the latest release unconditionally, skipping the freshness check.
- perform_
update - Installs the latest release, but only if it is newer than the current one.
- update_
interactive - Runs the
vct updateflow, optionally prompting for confirmation.