Skip to main content

Module update

Module update 

Source
Expand description

shellgame update: downloads the release archive for this platform, checks that the new binary runs and replaces the running one.

The archive is shellgame-<linux|macos>-<x86_64|aarch64>.tar.gz from the latest GitHub release (or $SHELLGAME_UPDATE_URL, which tests point at a file:// archive). curl and tar do the work, which keeps TLS out of the binary. The download goes into a temporary directory next to the running binary, so the final rename stays on one filesystem and replaces the binary atomically; a running binary can be replaced on Linux and macOS.

Enums§

Outcome
How an update ended when nothing went wrong.
Problem
Why an update failed. The messages are Czech and say what to do.

Functions§

asset_name
The archive of this platform, chosen at compile time.
download_url
The download address: $SHELLGAME_UPDATE_URL, or the latest release.
run
Downloads, unpacks, checks and installs the new binary. old is the version line of the running binary.