Documentation
¶
Overview ¶
Package upgrade replaces the gtt binary with another release. It is an adapter: it knows how each install channel (npm, uv, pipx, go install, the curl and PowerShell installers) puts the binary on the machine and how to take the next one from the release assets, verified, with a way back. It knows nothing of projects.
Index ¶
Constants ¶
const Repo = "GTT-Community/gtt-cli"
Repo is the only repository releases are taken from, unless the human declares a mirror.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Upgrader ¶
type Upgrader struct {
Runner ports.Runner
// Base is the mirror holding the release assets (GTT_DOWNLOAD_BASE); empty means GitHub releases.
Base string
// Exe is the binary being replaced; empty means the running one.
Exe string
// HTTP is the client; nil means a default one with timeouts.
HTTP *http.Client
// GOOS and GOARCH override the platform (tests); empty means this machine.
GOOS, GOARCH string
// GoBins are the directories `go install` writes to (GOBIN, GOPATH/bin); empty means read the environment.
GoBins []string
}
Upgrader implements ports.SelfUpgrader.