gitbranch

package
v0.82.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 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 GitBranch

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

GitBranch defines a resource of kind "gitbranch"

func New

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

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

func (*GitBranch) Changelog

func (gt *GitBranch) Changelog() string

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

func (*GitBranch) Condition

func (gt *GitBranch) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)

Condition checks that a git branch exists

func (*GitBranch) Source

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

Source returns the latest git tag based on create time

func (*GitBranch) Target

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

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

func (*GitBranch) Validate

func (gt *GitBranch) Validate() error

Validate tests that tag struct is correctly configured

type Spec

type Spec struct {
	// [s][c][t] Path contains the git repository path
	Path string `yaml:",omitempty"`
	// [s] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
	// [c][t] Specify branch name
	Branch string `yaml:",omitempty"`
}

Spec defines a specification for a "gitbranch" 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