Documentation
¶
Index ¶
- Variables
- type ChangeSet
- type Changelog
- type CommitEntry
- type Options
- type Semver
- func (s *Semver) FindPreviousVersion(r *git.Repository) (semver.Version, string, error)
- func (s *Semver) FindPreviousVersionFromFile() (semver.Version, string, error)
- func (s *Semver) FindPreviousVersionFromTag(r *git.Repository) (version semver.Version, foundTag string, errReturn error)
- func (s *Semver) ReplaceInFile(filename string, new string) error
- func (s *Semver) Run() error
- type TypeTag
- type Types
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
View Source
var TypesInOrder = Types{
"feat",
"fix",
"test",
"docs",
"build",
"refactor",
"chore",
}
View Source
var Version = "unknown"
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct {
Path string `default:"." short:"p" help:"Path for the git worktree/repo to log"`
SinceTag string `short:"s" help:"Tag from which to start" aliases:"since"`
DefaultType TypeTag `default:"fix" help:"if type is not specified in commit, assume this type"`
GuessMissingCommitType bool `default:"true" negatable:"" help:"If commit type is missing, take a guess about which it is"`
Order []TypeTag `default:"${type_order}" help:"order in which to list commit message types"`
}
func (*Changelog) CalculateChanges ¶
type Options ¶
type Options struct {
Debug bool `short:"d" help:"Show debugging information"`
LogFormat string `short:"l" enum:"auto,jsonl,terminal" default:"auto" help:"How to show program output (auto|terminal|jsonl)"`
Quiet bool `short:"q" help:"Be less verbose than usual"`
Changelog Changelog `cmd:""`
VersionCmd VersionCmd `name:"version" cmd:"" help:"show program version"`
Semver Semver `cmd:"" help:"Manipulate Semantic Versions"`
}
Options is the structure of program options
type Semver ¶
type Semver struct {
Changelog
FromTag bool `group:"source" xor:"source" required:"" help:"Set semver from the last tag" `
FromFile string `` /* 144-byte string literal not displayed */
ReplaceIn []string `type:"existingfile" placeholder:"FILE" help:"Replace version in these files"`
AllowUntracked bool `help:"allow untracked files to count as clean"`
}
func (*Semver) FindPreviousVersion ¶
func (*Semver) FindPreviousVersionFromFile ¶
func (*Semver) FindPreviousVersionFromTag ¶
type VersionCmd ¶
type VersionCmd struct{}
func (*VersionCmd) Run ¶
func (v *VersionCmd) Run() error
Click to show internal directories.
Click to hide internal directories.