bump

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: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None  = Type(0)
	Patch = Type(1)
	Minor = Type(2)
	Major = Type(3)
)

Variables

This section is empty.

Functions

func Bump

func Bump(version *semver.Version, bt Type) *semver.Version

Bump returns a new version after bumping it according to the specified bump bump.

Types

type Type

type Type int

func From

func From(previous, current *semver.Version) Type

From deduces the bump that caused the old version to go to the new.

func (Type) Cap

func (bt Type) Cap(other Type) Type

Cap returns the current bump if it is smaller or equal than another one, and second otherwise. e.g Major.Cap(Minor) returns Minor, and Patch.Cap(Minor) returns Patch.

func (Type) Less

func (bt Type) Less(other Type) bool

Less returns whether the current bump Type is smaller than another one.

func (Type) With

func (bt Type) With(other Type) Type

With composes two bump types, returning the largest of the two.

Jump to

Keyboard shortcuts

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