git

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentVersion

func GetCurrentVersion(r *git.Repository, settings *Settings, branchSettings *BranchSettings, verbose bool) (version string, err error)

GetCurrentVersion returns the current version

func GetPrereleaseLabel

func GetPrereleaseLabel(r *git.Repository, settings *Settings, branchSettings *BranchSettings) (result string, err error)

GetPrereleaseLabel returns the prerelease label for the current branch

Types

type BranchSettings

type BranchSettings struct {
	ForbidBehindMaster bool
	TrimBranchPrefix   bool
	IgnoreEnvVars      bool
}

BranchSettings contains flags that determine how branches are handled when calculating versions.

type Settings

type Settings struct {
	MajorPattern string `yaml:"major-version-bump-message"`
	MinorPattern string `yaml:"minor-version-bump-message"`
	PatchPattern string `yaml:"patch-version-bump-message"`
}

Settings provides the regex patterns used for version bumping

func GetDefaultSettings

func GetDefaultSettings() *Settings

GetDefaultSettings returns the default settings

func GetSettingsFromFile

func GetSettingsFromFile(file io.Reader) (*Settings, error)

GetSettingsFromFile provides a settings object by parsing the yaml from the file provided

Jump to

Keyboard shortcuts

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