skl update
Download the latest GitHub Release for this machine and replace the binary that is running. skl upgrade is an alias.
Synopsis
skl update
skl update --force
skl upgrade
Flags
--force. Download and replace even when the installed binary already matches the latest release checksum.
Environment
SKL_DOWNLOAD_BASE. Asset origin. Default ishttps://github.com/x0ba/skl/releases/latest/download, the same as the installer.
What it does
- Resolves the release triple for this OS and architecture:
x86_64-unknown-linux-musl,aarch64-unknown-linux-musl,x86_64-apple-darwin,aarch64-apple-darwin, orx86_64-pc-windows-gnu. - Downloads
SHA256SUMSfrom the asset origin. - Stops with
already up to datewhen the current binary matches the checksum for its triple, unless--forceis set. - Downloads
skl-<triple>, orskl-<triple>.exeon Windows, and checks its SHA-256. - Writes the download next to the current binary, runs
--versionon it, and replaces the binary only when that succeeds.
Config, state.db, the library, and shell configuration files do not change. A checksum mismatch or a failed download leaves the current binary in place. Two skl update processes on the same install use separate staging files and a lock around the replacement.
Output
==> latest v0.4.2
==> fetching SHA256SUMS
==> downloading https://github.com/x0ba/skl/releases/latest/download/skl-aarch64-apple-darwin
==> checksum ok (skl-aarch64-apple-darwin)
==> updated /home/you/.local/bin/skl (0.4.1 -> v0.4.2)
skl 0.4.2
Errors
config: unsupported platform <os>/<arch> for skl update (need a GitHub Release triple)config: SHA256SUMS has no entry for <asset>config: checksum mismatch for <asset> (got <hash>, want <hash>)config: new binary failed --version (<detail>). The download matched its checksum but did not run. The previous binary is unchanged.config: cannot resolve this skl binary: <error>- Network errors from the asset origin.