nextversion

package
v0.0.0-...-3a64406 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cli.Command{
	Name:  "next-version",
	Usage: "Prints the next version according to the current one, the changelog.yaml file, and semver conventions.",
	UsageText: `Current version is automatically discovered from git tags in the repository, in semver order. 
Tags that do not conform to semver standards are ignored.
Several flags can be specified to limit the set of tags that are scanned, and to override both the current version ` +
		`being detected and the computed next version.`,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    tagPrefix,
			EnvVars: common.EnvFor(tagPrefix),
			Usage:   "Consider only tags matching this prefix for figuring out the current version.",
			Value:   "",
		},
		&cli.StringFlag{
			Name:    currentFlag,
			EnvVars: common.EnvFor(currentFlag),
			Usage:   "If set, overrides current version autodetection and assumes this one.",
			Value:   "",
		},
		&cli.StringFlag{
			Name:    nextFlag,
			EnvVars: common.EnvFor(nextFlag),
			Usage:   "If set, overrides next version computation and assumes this one instead.",
			Value:   "",
		},
		&cli.StringFlag{
			Name:    gitRootFlag,
			EnvVars: common.EnvFor(gitRootFlag),
			Usage:   "Path to the git repo to find tags on.",
			Value:   "./",
		},
	},
	Action: NextVersion,
}

Cmd is the cli.Command object for the is-held command.

Functions

func NextVersion

func NextVersion(cCtx *cli.Context) error

NextVersion is a command function which loads a changelog.yaml file from disk and computes what the next version should be according to semver standards.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳