releases

package
v1.1.40 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentReleaseSymlink(root root.Root) string

CurrentReleaseSymlink returns the path to the current release symlink at ~/.thelma/releases/current

Types

type Dir

type Dir interface {
	// CurrentVersion returns the currently installed version of Thelma
	// Returns an error if the symlink does not exist, is broken, or another fs error occurs
	CurrentVersion() (string, error)
	// CurrentVersionMatches returns true if the currently installed version of
	// Thelma matches the given version.
	// Returns false if versions don't match, if there is no current version of Thelma (say,
	// during a fresh install), or if another error is encountered identifying the current version
	CurrentVersionMatches(version string) bool
	// UpdateCurrentReleaseSymlink atomically updates the current release symlink at ~/.thelma/releases/current
	// to point at a given installed release version
	UpdateCurrentReleaseSymlink(version string) error
	// CopyUnpackedArchive copies an unpacked release archive into the releases directory
	CopyUnpackedArchive(unpackDir string) error
	// WithInstallerLock executes a callback function while holding the release installer lock
	WithInstallerLock(fn func() error) error
	// CleanupOldReleases cleans up all but N most recent releases
	CleanupOldReleases(keepReleases int) error
}

Dir represents the local directory where Thelma stores its releases ("~/.thelma/releases")

func NewDir

func NewDir(dir string, scratch scratch.Scratch) Dir

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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