Help us shape the future of Go! Take the 2026 Go Developer Survey

update

package
v0.73.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package update replaces the running beekeeper with the latest signed release.

Index

Constants

View Source
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

View Source
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

func Run(ctx context.Context, w io.Writer, checkOnly bool) (Result, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL