imagebumper

package
v0.0.0-...-37c3036 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeconstructCommit

func DeconstructCommit(commit string) (string, int, string)

Examples:

v0.0.30-14-gdeadbeef => (v0.0.30 14 deadbeef)
v0.0.30 => (v0.0.30 0 "")
deadbeef => ("", 0, deadbeef)

See man git describe.

func DeconstructTag

func DeconstructTag(tag string) (date, commit, variant string)

DeconstructTag separates the tag into its vDATE-COMMIT-VARIANT components

COMMIT may be in the form vTAG-NEW-gCOMMIT, use PureCommit to further process this down to COMMIT.

Types

type Client

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

func NewClient

func NewClient(httpClient *http.Client) *Client

func (*Client) AddToCache

func (cli *Client) AddToCache(image, newTag string)

AddToCache keeps track of changed tags

func (*Client) FindLatestTag

func (cli *Client) FindLatestTag(imageHost, imageName, currentTag string) (string, error)

FindLatestTag returns the latest valid tag for the given image.

func (*Client) GetReplacements

func (cli *Client) GetReplacements() map[string]string

GetReplacements returns the tag replacements that have been made.

func (*Client) TagExists

func (cli *Client) TagExists(imageHost, imageName, currentTag string) (bool, error)

func (*Client) UpdateFile

func (cli *Client) UpdateFile(tagPicker func(imageHost, imageName, currentTag string) (string, error),
	path string, imageFilter *regexp.Regexp) error

UpdateFile updates a file in place.

Jump to

Keyboard shortcuts

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