Documentation ¶
Overview ¶
The git package contains functions for running git commands.
This package is deprecated and will be removed before the v1.0.0 release of gotagger.
Index ¶
- type Commit
- type Repo
- func (r Repo) CreateTag(commit string, v *semver.Version, prefix, message string, signed bool) error
- func (r Repo) Head() (Commit, error)
- func (r Repo) PushTag(tag *semver.Version, repo string) error
- func (r Repo) RevList(start, end string) ([]Commit, error)
- func (r Repo) Tags(prefixes ...string) (commits []Commit, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct { Hash string // The commit hash Subject string // The commit subject, generally the first line of the commit message Body string // The commit body Tags []*semver.Version // All tags that point to this commit. Trailers []string // The commit trailers }
Commit represents a commit in a git repository.
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo represents a git repository.
func (Repo) CreateTag ¶
func (r Repo) CreateTag(commit string, v *semver.Version, prefix, message string, signed bool) error
CreateTag tags a commit in a git repo.
If signed is true, then the tag will be a signed tag. This requires that your git configuration is properly setup for signing.
If prefix is a non-empty string, then the version will be prefixed with that string.
Click to show internal directories.
Click to hide internal directories.