Documentation
¶
Overview ¶
Package selfupdate downloads a newer ipsupport-code binary from GitHub Releases and replaces the running executable in place. It picks the release channel (stable = the latest tagged release, nightly = the rolling pre-release) and the asset for this machine's OS/arch, verifies the SHA-256, and atomically swaps the binary.
Index ¶
Constants ¶
const ( Stable = "stable" Nightly = "nightly" )
Channels.
const Repo = "ipsupport-llc/ipsupport-code"
Repo is the GitHub "owner/name" releases are pulled from.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply downloads the release asset, verifies its checksum, and replaces the running executable. It returns the path of the replaced binary.
func BrewUpgrade ¶ added in v0.62.22
func BrewUpgrade() string
BrewUpgrade is the command that updates this binary when Homebrew installed it, or "" when Homebrew didn't. Homebrew owns that install: replacing the file in its Cellar behind its back leaves brew believing in a version that is no longer there.