Documentation
¶
Overview ¶
Package update checks GitHub Releases for a newer Kite build and installs it. A portable copy swaps its own executable: download the new exe, rename the current one aside, move the new one into place and relaunch (works without admin rights). A copy set up by the Windows installer downloads the new setup instead and runs it silently.
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.