Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bumper ¶ added in v0.6.3
type Bumper interface {
Bump(*version.Version) (*version.Version, error)
}
Bumper bumps a version to a new version
type CommitParser ¶
type CommitParser interface {
GetBumperFromCommit(*git.Commit) Bumper
}
CommitParser parses the provided commit
GetBumperFromCommit parses a commit message and decide the bumper to use for version
type Logger ¶
type Logger interface { Log(from, to string) ([]*git.Commit, error) CommitHashByRevision(rev string) (string, error) }
Logger performs log commands on the repo
Log returns the commits for the specified reference range in reverse chronological order CommitHashByRevision returns the commit hash matching to a revision
type MonoRepo ¶ added in v0.6.3
type MonoRepo struct { *git.Repository // contains filtered or unexported fields }
MonoRepo contains repository instance and command parameters
type Tagger ¶
type Tagger interface { Tags() ([]string, error) CreateTag(versionedCommit *VersionedCommit) error }
Tagger performs tag commands on the repo
Tags returns all tags from the repo CreateTag writes the given tag to the given commit
type VersionedCommit ¶
type VersionedCommit struct { CommitID string Project string VersionPrefix string Version *version.Version }
VersionedCommit points a commit that is assigned a version
func (*VersionedCommit) GetTag ¶
func (vc *VersionedCommit) GetTag() string
GetTag returns the tag to version a commit with
func (*VersionedCommit) GetVersion ¶ added in v0.6.0
func (vc *VersionedCommit) GetVersion() string
GetVersion returns the version part of the tag
type Versioner ¶
type Versioner interface { GetCurrentVersion() (*VersionedCommit, error) ReleaseNewVersion(commitID string) (*VersionedCommit, error) InitVersion(commitID string) (*VersionedCommit, error) }
Versioner maintains version using tags
GetCurrentVersion retrieves the latest version ReleaseNewVersion creates and persists a new version InitVersion creates and persists the initial version