gittag

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 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) (bool, error)

Condition checks that a git tag exists

func (*GitTag) ConditionFromSCM

func (gt *GitTag) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)

ConditionFromSCM test if a tag exists from a git repository specific from SCM

func (*GitTag) Source

func (gt *GitTag) Source(workingDir string) (string, error)

Source returns the latest git tag based on create time

func (*GitTag) Target

func (gt *GitTag) Target(source string, dryRun bool) (changed bool, err error)

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

func (*GitTag) TargetFromSCM

func (gt *GitTag) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (changed bool, files []string, message string, err error)

TargetFromSCM creates and pushes a git tag based on the SCM configuration

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"`
}

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