releasebucket

package
v1.0.89 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

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

Archive represents a release archive in the Thelma releases bucket

func NewArchive

func NewArchive(version string, osArch ...string) Archive

func (*Archive) Filename

func (a *Archive) Filename() string

Filename returns the filename for this release archive eg. "thelma_v1.2.3_linux_amd64.tar.gz"

func (*Archive) ObjectPath

func (a *Archive) ObjectPath() string

ObjectPath returns the path to this release archive object in the bucket. eg. "releases/v.1.2.3/thelma_v1.2.3_linux_amd64.tar.gz"

func (*Archive) Sha256SumObjectPath

func (a *Archive) Sha256SumObjectPath() string

Sha256SumObjectPath returns the path to a sha256sum file for this release archive eg. "releases/v.1.2.3/thelma_v1.2.3_SHA256SUMS"

func (*Archive) Version

func (a *Archive) Version() string

Version return the semantic version for this archive eg. "v1.2.3"

type ReleaseBucket

type ReleaseBucket interface {
	// ResolveTagOrVersion given a tag like "latest", or a semantic version
	// string like "1.2.3", resolve to a proper Thelma semantic version like "v1.2.3"
	ResolveTagOrVersion(tagOrVersion string) (string, error)
	// DownloadAndUnpack will download and unpack a release archive in a tmp directory,
	// returning the path to the unpacked release archive
	DownloadAndUnpack(archive Archive) (path string, err error)
}

ReleaseBucket represents the Thelma releases bucket

func New

func New(releasesBucket bucket.Bucket, runner shell.Runner, scratch scratch.Scratch) ReleaseBucket

New returns a new ReleaseBucket

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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