updates

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PROJECT_URL = "https://github.com/jesseduffield/lazygit"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	Log       *logrus.Entry
	Config    config.AppConfigurer
	OSCommand *commands.OSCommand
	Tr        *i18n.Localizer
}

Updater checks for updates and does updates

func NewUpdater

func NewUpdater(log *logrus.Entry, config config.AppConfigurer, osCommand *commands.OSCommand, tr *i18n.Localizer) (*Updater, error)

NewUpdater creates a new updater

func (*Updater) CheckForNewUpdate

func (u *Updater) CheckForNewUpdate(onFinish func(string, error) error, userRequested bool)

CheckForNewUpdate checks if there is an available update

func (*Updater) RecordLastUpdateCheck

func (u *Updater) RecordLastUpdateCheck() error

RecordLastUpdateCheck records last time an update check was performed

func (*Updater) Update

func (u *Updater) Update(newVersion string, onFinish func(error) error)

Update downloads the latest binary and replaces the current binary with it

type Updaterer

type Updaterer interface {
	CheckForNewUpdate()
	Update()
}

Updaterer implements the check and update methods

Jump to

Keyboard shortcuts

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