Documentation ¶
Overview ¶
Package parser provides functions to parse a Git repository commit history.
This package is used to compute the semantic version number from a formatted Git repository commit history. To do so, it expects the commit history to follow the Conventional Commits specification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchLatestSemverTag ¶
FetchLatestSemverTag parses a Git repository to fetch the tag corresponding to the highest semantic version number among all tags.
Types ¶
type ComputeNewSemverOutput ¶
type OptionFunc ¶
type OptionFunc func(*Parser)
func WithBuildMetadata ¶
func WithBuildMetadata(metadata string) OptionFunc
func WithPrereleaseIdentifier ¶
func WithPrereleaseIdentifier(s string) OptionFunc
func WithPrereleaseMode ¶
func WithPrereleaseMode(b bool) OptionFunc
func WithReleaseBranch ¶
func WithReleaseBranch(branch string) OptionFunc
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ComputeNewSemver ¶
func (p *Parser) ComputeNewSemver(repository *git.Repository) (ComputeNewSemverOutput, error)
ComputeNewSemver returns the next, if any, semantic version number from a given Git repository by parsing its commit history.
Click to show internal directories.
Click to hide internal directories.