Documentation
¶
Index ¶
- func GetDotGit(providedDotGitPath string) (string, error)
- func GetPlainGitLogFromPreviousBuild(serverDetails *utilsconfig.ServerDetails, ...) (string, error)
- func ParseGitLogFromLastBuild(serverDetails *utilsconfig.ServerDetails, ...) error
- func ParseGitLogFromLastVcsRevision(gitDetails GitLogDetails, logRegExp *gofrogcmd.CmdOutputPattern, ...) (err error)
- type GitLogDetails
- type LogCmd
- type RevisionRangeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPlainGitLogFromPreviousBuild ¶
func GetPlainGitLogFromPreviousBuild(serverDetails *utilsconfig.ServerDetails, buildConfiguration *build.BuildConfiguration, gitDetails GitLogDetails, previousBuildPos int) (string, error)
Returns the git log output for the VCS revision for the previous build in position previousBuildPos. For previousBuildPos 0 the latest build is returned, for an input 1 the latest -1 is returned, etc. previousBuildPos must be 0 or above. Calls git log with a custom format, and returns the output as is. Return RevisionRangeError if revision isn't found (due to git history modification).
func ParseGitLogFromLastBuild ¶
func ParseGitLogFromLastBuild(serverDetails *utilsconfig.ServerDetails, buildConfiguration *build.BuildConfiguration, gitDetails GitLogDetails, logRegExp *gofrogcmd.CmdOutputPattern) error
Parses git commits from the last build's VCS revision. Calls git log with a custom format, and parses each line of the output with regexp. logRegExp is used to parse the log lines.
func ParseGitLogFromLastVcsRevision ¶
func ParseGitLogFromLastVcsRevision(gitDetails GitLogDetails, logRegExp *gofrogcmd.CmdOutputPattern, lastVcsRevision string) (err error)
Parses git log line by line, using the parser provided in logRegExp. Git log is parsed from lastVcsRevision to HEAD.
Types ¶
type GitLogDetails ¶
type LogCmd ¶
type LogCmd struct {
// contains filtered or unexported fields
}
func (*LogCmd) GetErrWriter ¶
func (logCmd *LogCmd) GetErrWriter() io.WriteCloser
func (*LogCmd) GetStdWriter ¶
func (logCmd *LogCmd) GetStdWriter() io.WriteCloser
type RevisionRangeError ¶
type RevisionRangeError struct {
ErrorMsg string
}
Error to be thrown when revision could not be found in the git revision range.
func (RevisionRangeError) Error ¶
func (err RevisionRangeError) Error() string