Documentation
¶
Index ¶
- func AnnotatedTag(tag string, cd CommitDetails) error
- func Clean(output string, err error) (string, error)
- func Commit(cd CommitDetails) error
- func EmptyCommit(t *testing.T, commit string)
- func EmptyCommitAndTag(t *testing.T, tag, msg string)
- func EmptyCommits(t *testing.T, commits ...string)
- func EmptyCommitsAndTag(t *testing.T, tag string, msgs ...string)
- func InitRepo(t *testing.T)
- func IsRepo() bool
- func LatestTag() string
- func MkTmpDir(t *testing.T)
- func Push() error
- func Run(args ...string) (string, error)
- func Stage(path string) error
- func Tag(tag string) error
- type CommitDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotatedTag ¶ added in v0.6.0
func AnnotatedTag(tag string, cd CommitDetails) error
AnnotatedTag will create an annotated tag against the repository and push it to the origin
func Commit ¶
func Commit(cd CommitDetails) error
Commit will generate a commit against the repository and push it to the origin. The commit will be associated with the provided author and email address
func EmptyCommit ¶
EmptyCommit will create an empty commit without the need for modifying any existing files within the repository
func EmptyCommitAndTag ¶
EmptyCommitAndTag will create an empty commit with an associated tag. No existing files will be modified within the repository
func EmptyCommits ¶
EmptyCommits will create any number of empty commits without the need for modifying any existing files within the repository
func EmptyCommitsAndTag ¶
EmptyCommitsAndTag will create any number of empty commits and associate them with a tag. No existing files will be modified within the repository
func InitRepo ¶
InitRepo creates an empty git repository within a temporary directory. Once created the current testing context will operate from within that directory until the calling test has completed
func IsRepo ¶
func IsRepo() bool
IsRepo identifies whether the current working directory is a recognised git repository
func MkTmpDir ¶
MkTmpDir creates an empty directory that is not a git repository. Once created the current testing context will operate from within that directory until the calling test has completed
Types ¶
type CommitDetails ¶ added in v0.4.0
CommitDetails contains mandatory details about a specific git commit
func LatestCommit ¶
func LatestCommit() (CommitDetails, error)
LatestCommit retrieves the latest commit within the repository
func (CommitDetails) String ¶ added in v0.4.0
func (c CommitDetails) String() string
String prints out a user friendly string representation