Documentation
¶
Index ¶
- Variables
- func BumpVersion(isPublic bool) error
- func Commit(isPublic bool, message string) error
- func Dirty(isPublic bool) error
- func GoGet(isPublic bool) error
- func NewLocalError(msg string, err error, out string) error
- func NewRemoteError(msg string, err error, out string) error
- func RepositoryURLs(isPublic bool) ([]string, error)
- func Update(isPublic bool) error
- type GitRepo
- func (s *GitRepo) CheckLocal() bool
- func (s *GitRepo) Clone() error
- func (s *GitRepo) Commit(message string) error
- func (s *GitRepo) Date() (time.Time, error)
- func (s *GitRepo) Init() error
- func (s *GitRepo) IsDirty() bool
- func (g *GitRepo) LocalPath() string
- func (g *GitRepo) Remote() string
- func (g *GitRepo) RunFromDir(cmd string, args ...string) ([]byte, error)
- func (s *GitRepo) Update() error
- type LocalError
- type RemoteError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrWrongVCS is returned when an action is tried on the wrong VCS. ErrWrongVCS = errors.New("Wrong VCS detected") // ErrCannotDetectVCS is returned when VCS cannot be detected from URI string. ErrCannotDetectVCS = errors.New("Cannot detect VCS") // ErrWrongRemote occurs when the passed in remote does not match the VCS // configured endpoint. ErrWrongRemote = errors.New("The Remote does not match the VCS endpoint") // unavailable. ErrRevisionUnavailable = errors.New("Revision unavailable") )
var Logger *log.Logger
Logger is where you can provide a logger, implementing the log.Logger interface, where verbose output from each VCS will be written. The default logger does not log data. To log data supply your own logger or change the output location of the provided logger.
var (
Verbose = false
)
Functions ¶
func BumpVersion ¶
func NewLocalError ¶
NewLocalError constructs a LocalError
func NewRemoteError ¶
NewRemoteError constructs a RemoteError
func RepositoryURLs ¶
Types ¶
type GitRepo ¶
type GitRepo struct {
RemoteLocation string
Logger *log.Logger
// contains filtered or unexported fields
}
func NewGitRepo ¶
NewGitRepo creates a new instance of GitRepo. The remote and local directories need to be passed in.
func (*GitRepo) CheckLocal ¶
CheckLocal verifies the local location is a Git repo.
func (*GitRepo) IsDirty ¶
IsDirty returns if the checkout has been modified from the checked out reference.
func (*GitRepo) RunFromDir ¶
type LocalError ¶
type LocalError struct {
// contains filtered or unexported fields
}
LocalError is returned when a local operation has an error
type RemoteError ¶
type RemoteError struct {
// contains filtered or unexported fields
}
RemoteError is returned when an operation fails against a remote repo
func (*RemoteError) Error ¶
func (e *RemoteError) Error() string
Error implements the Error interface