version

package
v0.20.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintUpdateWarning

func PrintUpdateWarning(result *CheckResult, cfg *config.Config, output *io.Writer)

PrintUpdateWarning prints a warning message to stderr if an update is available

Types

type CheckResult

type CheckResult struct {
	UpdateAvailable bool
	LatestVersion   string
	CurrentVersion  string
	InstallMethod   InstallMethod
	UpdateCommand   string
}

CheckResult contains the result of a version check

func CheckForUpdate added in v0.20.6

func CheckForUpdate(cfg *config.Config) (*CheckResult, error)

CheckForUpdate fetches the latest released version and returns the result with no side effects (no throttling, CI/terminal gating, or persisted state). Gating (whether to check at all) is the caller's responsibility: the startup notifier gates on an interactive, non-CI terminal in root.go, while the `tiger upgrade` command always wants a fresh result on demand.

Note: CheckResult.LatestVersion has its leading "v" trimmed (for display and comparison). Callers that need the release tag used in download paths (e.g. releases/v1.2.3/) must re-add the "v" prefix.

type InstallMethod

type InstallMethod string

InstallMethod represents how Tiger CLI was installed

const (
	InstallMethodHomebrew    InstallMethod = "homebrew"
	InstallMethodDeb         InstallMethod = "deb"
	InstallMethodRPM         InstallMethod = "rpm"
	InstallMethodInstallSh   InstallMethod = "install_sh"
	InstallMethodUnknown     InstallMethod = "unknown"
	InstallMethodDevelopment InstallMethod = "development"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL