program

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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            changes.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                  []changes.TypeTag `default:"${type_order}" help:"order in which to list commit message types"`
}

func (*Changelog) CalculateChanges

func (c *Changelog) CalculateChanges() (*changes.ChangeSet, error)

func (*Changelog) Run

func (c *Changelog) Run() error

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

func (*Options) Init

func (program *Options) Init()

func (*Options) Run

func (program *Options) Run() error

Run runs the program

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 (s *Semver) FindPreviousVersion(r *git.Repository) (semver.Version, string, error)

func (*Semver) ReplaceInFile

func (s *Semver) ReplaceInFile(filename string, new string) error

func (*Semver) Run

func (s *Semver) Run() error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (v *VersionCmd) Run() error

Jump to

Keyboard shortcuts

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