Documentation
¶
Overview ¶
Package update replaces the running beekeeper with the latest signed release.
Index ¶
Constants ¶
const Repository = "giantswarm/beekeeper"
Repository is the GitHub repository whose releases carry the binaries: beekeeper-<os>-<arch> (beekeeper-windows-<arch>.exe), each next to its cosign Sigstore bundle (<asset>.bundle), which the download is verified against before anything is written.
Variables ¶
var ErrOutdated = errors.New("a newer beekeeper release is available")
ErrOutdated is what a check returns when a newer release exists.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Current string `json:"current"`
Latest string `json:"latest"`
Published time.Time `json:"published"`
URL string `json:"url"`
Newer bool `json:"newer"`
// Path is the file the update replaced, symbolic links not resolved.
Path string `json:"path,omitempty"`
Updated bool `json:"updated"`
}
Result is what a check or an update found and did.
func Run ¶
Run looks up the latest release and, unless checkOnly, installs its binary for this OS and architecture over the running executable once its bundle verifies. Progress goes to w. With checkOnly the error is ErrOutdated when a newer release exists.
The binary is renamed over the executable in one step, symbolic links resolved: a beekeeper watch that runs keeps running the old binary, every process started afterwards runs the new one, and several updates may run at once. A development build, a release without a bundle for this platform's binary and a download that does not verify are refused, and the executable stays as it is.