This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {
	RepoPath string // RepoPath is the path to the git repository's root. Git commands executed by this Client will be run at this path.

    Client is a wrapper around the git CLI tool.

    func (Client) Commit

    func (c Client) Commit(unstagedPaths []string, message string) error

      Commit stages all given paths and commits with the given message.

      func (Client) CommitHash

      func (c Client) CommitHash() (string, error)

        CommitHash returns a timestamp and commit hash for the HEAD commit of the given repository, formatted in the way expected for a go.mod file pseudo-version.

        func (Client) Push

        func (c Client) Push() error

          Push pushes commits and tags to the repository.

          func (Client) Tag

          func (c Client) Tag(tag, message string) error

            Tag creates an annotated git tag with the given message.

            func (Client) Tags

            func (c Client) Tags(prefix string) ([]string, error)

              Tags returns all git tags with the given prefix.

              type VcsClient

              type VcsClient interface {
              	Tag(tag, message string) error
              	Tags(prefix string) ([]string, error)
              	Commit(unstagedPaths []string, message string) error
              	Push() error
              	CommitHash() (string, error)

                VcsClient is a client that interacts with a version control system.

                Source Files