Documentation
¶
Overview ¶
Package updater checks for and installs updates from GitHub Releases. It is intentionally dependency-free (standard library only) so it can be imported by both the TUI and the CLI without pulling in TUI dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SigningPublicKey string
SigningPublicKey is the Ed25519 public key used to verify release signatures. Set at build time via -ldflags for release builds. Empty means "no signing key configured" — verification is skipped with a warning. The value should be hex-encoded (64 chars = 32 bytes).
Functions ¶
Types ¶
type ReleaseInfo ¶
type ReleaseInfo struct {
Version string // e.g. "0.5.0" (no "v" prefix)
TagName string // e.g. "v0.5.0"
Body string // release notes markdown
UpdateAvail bool // true if Version is newer than the version passed to CheckLatest
AssetURL string // direct download URL for the correct platform binary
ChecksumURL string // direct download URL for checksums.txt
SignatureURL string // direct download URL for checksums.txt.sig (Ed25519)
}
ReleaseInfo holds information about the latest GitHub release.
func CheckLatest ¶
func CheckLatest(currentVersion string) (ReleaseInfo, error)
CheckLatest fetches the latest release from GitHub and compares it to currentVersion (which should be without the "v" prefix, e.g. "0.4.0").