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 PackageManager ¶ added in v0.70.0
func PackageManager() (by, update string)
PackageManager names the package manager that installed this binary and the command that updates it, or "", "" when none did. That manager owns the install: replacing the file behind its back leaves it believing in a version that is no longer there.