release

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpTag

func BumpTag(latest *semver.Version, semVerType SemVerBumpType, preReleaseFormat PreReleaseFormat, preReleasePrefix string, isPreRelease bool) string

BumpTag takes a semver.Version and a semVerBumpType and returns the bumped version as a string.

func GetLatestSemVerTagFromRepo

func GetLatestSemVerTagFromRepo(repo *git.Repository, isPreRelease bool) (*semver.Version, error)

GetLatestSemVerTagFromRepo returns the latest semver tag from a given git repository. If no semver tag is found, it returns a semver.Version with the value v0.0.0.

Types

type PreReleaseFormat

type PreReleaseFormat string
const (
	// PreReleaseFormatSemVer is the default format for prerelease versions.
	PreReleaseFormatSemVer PreReleaseFormat = "semver"
	// PreReleaseFormatDate is the format for prerelease versions that use the
	// current date.
	PreReleaseFormatDate PreReleaseFormat = "date"
	// PreReleaseFormatDateTime is the format for prerelease versions that
	// use the current date and time.
	PreReleaseFormatDateTime PreReleaseFormat = "datetime"
)

func (PreReleaseFormat) String

func (p PreReleaseFormat) String() string

type SemVerBumpType

type SemVerBumpType string
const (
	// SemVerBumpTypeMajor is the bump type for major versions.
	SemVerBumpTypeMajor SemVerBumpType = "major"
	// SemVerBumpTypeMinor is the bump type for minor versions.
	SemVerBumpTypeMinor SemVerBumpType = "minor"
	// SemVerBumpTypePatch is the bump type for patch versions.
	SemVerBumpTypePatch SemVerBumpType = "patch"
	// SemVerBumpTypeNone is the bump type for no version bump.
	SemVerBumpTypeNone SemVerBumpType = "none"
)

func (SemVerBumpType) String

func (s SemVerBumpType) String() string

Jump to

Keyboard shortcuts

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