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), lock (cross-process serialization), ownership
(official-installer marker), platform (asset-name derivation and the
OS-specific binary swap), and version_cache (daily check cadence).
Structs§
- GitHub
Asset - A single downloadable file attached to a
GitHubRelease. - GitHub
Release - A GitHub release, deserialized from the Releases API.
Enums§
- Auto
Update Outcome - Result of the best-effort startup update hook.
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. - maybe_
auto_ update - Checks for and silently installs a newer release when startup policy allows.
- 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.