semver

package
v0.0.0-...-feb7e18 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bump

type Bump struct {
	base.Command
	//Which string `short:"w" long:"which" description:"The field to bump." choice:"major" choice:"M" choice:"minor" choice:"m" choice:"patch" choice:"p" choice:"revision" choice:"rev" choice:"r" optional:"yes" default:"patch"`
	Major    bool `short:"M" long:"major" description:"Bump the major field." optional:"yes"`
	Minor    bool `short:"m" long:"minor" description:"Bump the minor field." optional:"yes"`
	Patch    bool `short:"p" long:"patch" description:"Bump the patch (aka revision) field." optional:"yes"`
	Revision bool `short:"r" long:"revision" description:"Bump the revision (aka patch) field." optional:"yes"`
}

func (*Bump) Execute

func (cmd *Bump) Execute(args []string) error

type Check

type Check struct {
	base.Command
}

func (*Check) Execute

func (cmd *Check) Execute(args []string) error

type SemVer

type SemVer struct {
	Original   string `json:"original,omitempty"`
	Major      uint64 `json:"major"`
	Minor      uint64 `json:"minor"`
	Patch      uint64 `json:"patch"`
	PreRelease string `json:"prerelease,omitempty"`
	Metadata   string `json:"metadata,omitempty"`
}

func NewSemVer

func NewSemVer(v *semver.Version) *SemVer

type SemanticVersion

type SemanticVersion struct {
	// Bump bumps the version (major, minor or revsion/patch) and prints it out.
	Bump Bump `command:"bump" alias:"b" description:"Bump the version in a semantic version."`
	// Check parses the version and prints it out.
	Check Check `command:"check" alias:"c" description:"Check the semantic version by parsing it."`
}

SemanticVersion is the set of root command groups.

Jump to

Keyboard shortcuts

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