Skip to main content

Module self_update

Module self_update 

Source
Expand description

oino update [--check] (modes.md §1.2): self-update from the GitHub release manifest.

Reads release-manifest.json of the latest release (or OINO_REF), picks the oino artifact of this target, verifies its sha256 and atomically replaces the running binary (renaming the old one away first, which also works for a running .exe on Windows). OINO_RELEASE_MANIFEST overrides the manifest URL (mirrors, tests).

Structs§

Artifact
One release binary.
ReleaseManifest
release-manifest.json.

Enums§

UpdateError
Failure of a self-update.

Functions§

current_target
This build’s release target (x86_64-unknown-linux-gnu, aarch64-apple-darwin, …).
is_newer
Compares dotted versions with pre-release suffixes (1.0.0-alpha.2 > 1.0.0-alpha.1, 1.0.0 > 1.0.0-alpha.9).
self_update
Checks for (and unless check, installs) a newer release; returns the message to print.