Documentation
¶
Overview ¶
Package selfupdate lets the scout binary upgrade itself from GitHub Releases: it finds the latest published version, and replaces the running executable with the matching release asset for this OS/arch. It is used by `scout update` and by the throttled auto-update check on startup.
Index ¶
Constants ¶
const Repo = "MUKE-coder/scout"
Repo is the GitHub repository releases are published to.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply downloads the release asset and replaces the running executable with the scout binary inside it. It is safe while running: on Windows the current executable is renamed aside first (a running .exe cannot be overwritten, but it can be moved), then the new binary takes its place.
func AssetName ¶
func AssetName() string
AssetName is the GoReleaser asset file name for this OS/arch.
func Newer ¶
Newer reports whether released (e.g. "v0.4.16" or "0.4.16") is a higher semantic version than current. A dev/unparseable current is never "older" of its own accord — callers guard dev builds separately — but Newer returns false when either side cannot be parsed, so a bad read never triggers an update.