Documentation
¶
Overview ¶
Package appupdate checks GitHub for a newer lich release and, on a Windows install no package manager owns, downloads and runs the release's installer. Everywhere else lich belongs to a package manager (a Linux package, Homebrew, Scoop), so this package only reports the update: the UI drives the install through that manager instead (see install.sh and the /restart endpoint), or points at the release page where it can name none.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Progress ¶
type Progress = api.AppUpdateProgress
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service reports lich's own update state and applies self-updates where the binary is writable.
func New ¶
New returns a service that reports version as the running build and polls GitHub for the latest release. install runs a downloaded Windows installer; emit is the app's event hub.
func (*Service) Apply ¶
Apply verifies the latest release's Windows installer against its SHA-256 checksum and hands the install over to it; the installer closes and relaunches lich. Only valid where CanSelfApply is true.
func (*Service) RequiredUpdate ¶ added in v0.87.0
RequiredUpdate is the error a new session is refused with while a release that marks itself required is pending, nil otherwise. It answers from the last lookup, whoever asked for it. A lookup that failed reports nothing required, as it reports no update, and a build that is not a release is never asked to update, so it looks nothing up.
type Status ¶
type Status = api.AppUpdateStatus