Documentation
¶
Overview ¶
Package selfupdate updates the running draugr binary to a released version. Downloads are verified against the release's SHA-256 checksums (mandatory) and its keyless cosign signature (best-effort, when the cosign CLI is present) before the binary is replaced.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentVersion ¶
func CurrentVersion() string
CurrentVersion is the running binary's version (build stamp), without a leading "v".
func LatestVersion ¶
LatestVersion resolves the latest published release version (no leading "v") via the github.com releases/latest redirect — deliberately not the api.github.com REST endpoint, which is rate-limited and has been flaky. Use a short timeout for interactive/offline paths.
Types ¶
type Result ¶
type Result struct {
Previous string // version before (may be "dev")
Target string // version updated (or would update) to
NoChange bool // already on the target version
SignatureVerified bool // cosign signature verified (vs SHA-256-only)
Note string // provenance note (e.g. why cosign was skipped)
Path string // the binary that was replaced
}
Result describes a self-update outcome.