cmd

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoConfigFile = errors.New("config file not found")
	ErrNoNewVersion = errors.New("no new version specified")
)
View Source
var EXIT_CODE_NO_NEW_VERSION = 8

Functions

func NewRootCmd

func NewRootCmd() *cobra.Command

func NewTagCmd

func NewTagCmd() (*cobra.Command, error)

Types

type Tagger

type Tagger struct {
	ConfigFile string `koanf:"config"`
	// DryRun will cause tag to print, but not execute, any actions.
	DryRun bool `koanf:"dry-run"`
	// GitEmail is the email provided for the git tags
	GitEmail string `koanf:"git-email" validate:"required"`
	// GitName is the name provided for the git tags
	GitName string `koanf:"git-name" validate:"required"`
	// TagMajor, if set to True, will create a major-version tag (e.g. v0, v1)
	// that points to the same commit as the full tag.
	TagMajor bool `koanf:"tag-major"`
	// Version is the tag that is to be created.
	Version string `koanf:"version" validate:"required"`
}

func NewTagger

func NewTagger(k *koanf.Koanf) (*Tagger, error)

func (*Tagger) Tag

func (t *Tagger) Tag() (requestedVersion *semver.Version, previousVersion *semver.Version, err error)

Jump to

Keyboard shortcuts

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