Documentation
¶
Overview ¶
Package update finds out whether a newer triage release exists and installs it.
Index ¶
- Constants
- func AssetName(goos, goarch string) string
- func Due(st *store.Store) bool
- func Executable() (string, error)
- func Install(ctx context.Context, version string) (string, error)
- func InstallDir(goBin string) string
- func InstallRelease(ctx context.Context, version, target string) error
- func IsRelease(version string) bool
- func Newer(current, latest string) bool
- func RunningFrom() string
- type Release
Constants ¶
const ( // ReleaseRepo is where triage releases are published. ReleaseRepo = "aloglu/triage" // Package is what `go install` installs. Package = "github.com/aloglu/triage/cmd/triage" )
Variables ¶
This section is empty.
Functions ¶
func Executable ¶ added in v0.3.2
Executable returns the path of the running binary, with symlinks resolved.
func InstallDir ¶
InstallDir returns the directory `go install` writes binaries to.
func InstallRelease ¶ added in v0.3.2
InstallRelease replaces the binary at target with version's release build for this platform. The download is checked against the release's checksums, and target is replaced in one step, so a failure at any point leaves the current binary untouched.
func IsRelease ¶
IsRelease reports whether version is a tagged release, as opposed to a development build, which never gets update notices.
func RunningFrom ¶
func RunningFrom() string
RunningFrom returns the directory of the running triage binary.
Types ¶
type Release ¶
Release describes an available version.
func Cached ¶
Cached returns the newest release seen so far if it's newer than current, without contacting GitHub.