Skip to main content

Module update

Module update 

Source
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§

GitHubAsset
A single downloadable file attached to a GitHubRelease.
GitHubRelease
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_VERSION string, 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 update flow, optionally prompting for confirmation.