Documentation
¶
Index ¶
Constants ¶
const SuggestedManualInstallScript = "curl -fsSL https://raw.githubusercontent.com/allisonhere/tide/main/install.sh | sh"
SuggestedManualInstallScript is shown when an update is available but the running binary's install directory is not writable (before any download/install attempt).
Variables ¶
This section is empty.
Functions ¶
func InstallDestinationWritable ¶
InstallDestinationWritable reports whether the directory containing the current executable allows creating files (same gate as in-place install).
func IsNewerVersion ¶
func IsStableVersion ¶
Types ¶
type CheckResult ¶
type CheckResult struct {
CurrentVersion string
Latest ReleaseInfo
Available bool
}
CheckResult reports whether a newer stable release is available for the running version. -allie
type DownloadedAsset ¶
type DownloadedAsset struct {
Release ReleaseInfo
ArchivePath string
BinaryPath string
}
DownloadedAsset points at the extracted update payload staged for installation. -allie
type InstallResult ¶
type InstallResult struct {
Version string
ExecutablePath string
RequiresManual bool
ManualCommand string
Restartable bool
}
InstallResult tells the UI whether Tide was replaced directly or needs a manual command. -allie
type ReleaseInfo ¶
type ReleaseInfo struct {
Version string
PublishedAt time.Time
Summary string
Body string
AssetName string
DownloadURL string
}
ReleaseInfo is the normalized release and asset metadata the UI needs after a check. -allie
type Updater ¶
Updater checks GitHub releases and installs the asset matching the current platform. -allie
func (*Updater) Download ¶
func (u *Updater) Download(release ReleaseInfo) (DownloadedAsset, error)
func (*Updater) Install ¶
func (u *Updater) Install(asset DownloadedAsset, currentExec string) (InstallResult, error)