update

package
v0.0.2-testing Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package update implements update notifications and `reearth upgrade` (self-update from GitHub Releases with checksum verification).

Index

Constants

View Source
const Repo = "reearth/cli"

Repo is the GitHub repository that publishes releases.

Variables

This section is empty.

Functions

func ArchiveName

func ArchiveName(version, goos, goarch string) string

ArchiveName returns the goreleaser archive name for a version (without "v").

func DoctorCheck

func DoctorCheck(appName string) func(ctx context.Context) []core.Check

DoctorCheck reports the version and install method.

func Executable

func Executable() (string, error)

Executable returns the resolved path of the running binary.

func NewCmdUpgrade

func NewCmdUpgrade(f *core.Factory) *cobra.Command

func Newer

func Newer(a, b string) bool

Newer reports whether version a is newer than b (with or without "v").

Types

type Method

type Method struct {
	Name string `json:"name"`
	// Command upgrades the CLI when Self is false.
	Command string `json:"command,omitempty"`
	// Self means `reearth upgrade` may replace the binary in place.
	Self bool `json:"self"`
}

Method is how the running binary was installed.

func DetectMethod

func DetectMethod(exe string) Method

DetectMethod infers the install method from the executable path.

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier checks for a newer release in the background and prints a one-line notice after the command finishes.

func Start

func Start(f *core.Factory, args []string) *Notifier

Start begins a background check if notifications are appropriate.

func (*Notifier) Notify

func (n *Notifier) Notify(f *core.Factory)

Notify prints the notice if a newer version is known. It waits briefly for an in-flight check so that the first run after the interval can report.

Jump to

Keyboard shortcuts

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