Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
GitRepo represents a repository we want to run actions against
func NewRepo ¶
func NewRepo(cfg GitRepoConfig) (*GitRepo, error)
NewRepo is a constructor for a repo object, parsing the tags that exist
func (*GitRepo) LatestVersion ¶
LatestVersion Reports the Latest version of the given repo TODO:(jnelson) this could be more intelligent, looking for a nil new and reporting the latest version found if we refactor autobump at some point Mon Sep 14 13:05:49 2015
type GitRepoConfig ¶ added in v1.1.2
type GitRepoConfig struct { // Repo is the path to the root of the git repository. RepoPath string // Branch is the name of the git branch to be tracked for tags. This value // must be provided. Branch string // PreReleaseName is the optional string to be appended to a tag being // generated (e.g., v.1.2.3-pre) to indicate the pre-release type. // // You can provide any string you want (that is valid for a Git tag); here // are some recommended values: // // * pre(release) // * alpha // * beta // * rc PreReleaseName string // PreReleaseTimestampLayout is the optional value that's used to append a // timestamp to the git tag. The timezone will always be UTC. This value can // either be the string `epoch` to be the UNIX epoch, or a Golang time // layout string: // // * https://golang.org/pkg/time/#pkg-constants // // If PreReleaseName is an empty string, the timestamp will be appended // directly to the SemVer tag: // // v1.2.3-1499308568 // // Assuming PreReleaseName is set to `pre`, the timestamp is appended to // that value separated by a period (`.`): // // v1.2.3-pre.1499308568 PreReleaseTimestampLayout string // BuildMetadata is an optional string appended by a plus sign and a series of dot separated // identifiers immediately following the patch or pre-release version. Identifiers MUST comprise // only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata // MUST be ignored when determining version precedence. Thus two versions that differ only in the // build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, // 1.0.0-beta+exp.sha.5114f85 // https://semver.org/#spec-item-10 BuildMetadata string // Scheme is the versioning scheme to use when determining the version of the next // tag. If not specified the default "autotag" is used. // // * "autotag" (default if not specified): // // A git commit message header containing one of the following: // * [major] or #major: major version bump // * [minor] or #minor: minor version bump // * [patch] or #patch: patch version bump // * none of the above: patch version bump // // * "conventional" implements the Conventional Commits v1.0.0 scheme. // * https://www.conventionalcommits.org/en/v1.0.0/#summary w Scheme string // Prefix prepends literal 'v' to the tag, eg: v1.0.0. Enabled by default Prefix bool }
GitRepoConfig is the configuration needed to create a new *GitRepo.
Click to show internal directories.
Click to hide internal directories.