gittag

package
v0.55.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitTag

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

GitTag defines a resource of kind "gittag"

func New

func New(spec interface{}) (*GitTag, error)

New returns a reference to a newly initialized GitTag object from a Spec or an error if the provided Filespec triggers a validation error.

func (*GitTag) Changelog

func (gt *GitTag) Changelog() string

Changelog returns the changelog for this resource, or an empty string if not supported

func (*GitTag) Condition

func (gt *GitTag) Condition(source string, scm scm.ScmHandler, resultCondition *result.Condition) error

Condition checks that a git tag exists

func (*GitTag) Source

func (gt *GitTag) Source(workingDir string, resultSource *result.Source) error

Source returns the latest git tag based on create time

func (*GitTag) Target

func (gt *GitTag) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error

Target creates a tag if needed from a local git repository, without pushing the tag

func (*GitTag) Validate

func (gt *GitTag) Validate() error

Validate tests that tag struct is correctly configured

type Spec

type Spec struct {
	// Path contains the git repository path
	Path string `yaml:",omitempty"`
	// VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
	// Message associated to the git tag
	Message string `yaml:",omitempty"`
	// Key of the tag object to retrieve, default is tag "name" filters are always against tag name, this only controls the output; Current options are 'name' and 'hash'.
	Key string `yaml:",omitempty"`
}

Spec defines a specification for a "gittag" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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