Documentation
¶
Overview ¶
Package updater implements `shepherd update`: it checks the latest GitHub release, downloads the matching release archive, verifies its checksum, and atomically replaces the running executable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckInfo ¶
type CheckInfo struct {
Current string `json:"current"`
Latest string `json:"latest"`
Available bool `json:"available"`
}
CheckInfo is the result of a cached update check.
func CachedCheck ¶
CachedCheck returns whether a newer release is available, using a 24h on-disk cache to avoid hitting the network on every invocation. It is best-effort: any error yields Available=false and never surfaces. Dev builds are never flagged as out of date.
type Result ¶
type Result struct {
Current string `json:"current"`
Latest string `json:"latest"`
UpToDate bool `json:"up_to_date"`
Updated bool `json:"updated"`
Asset string `json:"asset,omitempty"`
Path string `json:"path,omitempty"`
CheckOnly bool `json:"check_only"`
}
Result describes the outcome of an update check/run.
Click to show internal directories.
Click to hide internal directories.