Documentation
¶
Overview ¶
Package update checks GitHub Releases for a newer Kite build and can swap the running binary for the downloaded one. Kite ships as a portable single-file executable (no installer), so "update" means: download the new exe, rename the current one aside, move the new one into place, and relaunch -- the same rename+relaunch pattern Go self-updaters use, which works without admin rights on both Windows and Linux.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply downloads the platform asset referenced by a prior Check() result and swaps it in for the running executable, then relaunches it. Only call this after Check() reported Available -- it returns an error on any failure *before* relaunching; once the new process is successfully started, it does not return at all (the caller is expected to exit). onProgress may be nil; when set, it's called periodically during the download (never concurrently).
func CleanupOldBinary ¶ added in v0.10.3
func CleanupOldBinary()
CleanupOldBinary removes the previous executable Apply renamed aside. Apply can't delete it itself on Windows -- it's the image of the process that's still running at that point -- so the next launch does it.
Types ¶
type Info ¶
type Info struct {
Available bool `json:"available"`
Current string `json:"current"`
Latest string `json:"latest"`
Notes string `json:"notes"`
// contains filtered or unexported fields
}
Info describes the result of a Check. downloadURL is deliberately unexported: it's only ever needed internally by Apply, and keeping it out of the struct's JSON encoding means it never crosses the Wails bridge to the frontend.