Documentation
¶
Index ¶
- Constants
- Variables
- func Command(workdir, command string, args ...string) *exec.Cmd
- func ContextRun(ctx context.Context, cmd *exec.Cmd) error
- func GetSubmoduleRev(gitDir, submodulePath, mainRev string) (string, error)
- func GetSubmoduleRevs(gitDir, mainRev string, submodules []Submodule) error
- func GitCommitTimes(gitDir, revision string) (map[string]time.Time, error)
- func GitSetMTimes(gitDir, checkoutDir, ref string) error
- func MultipleErrors(errs <-chan error) error
- func PrepSubmodules(gitDir, checkoutDir, mainRev string) error
- func SafeCleanup(path string) error
- type BuildDirectory
- type ErrMultiple
- type GithubStatus
- type JustNongithub
- type NonGithub
- type PushEvent
- type Pusher
- type Repository
- type Submodule
Constants ¶
View Source
const GIT_BASE_DIR = "repo"
Variables ¶
View Source
var ( ErrEmptyRepoName = errors.New("Empty repository name") ErrEmptyRepoOrganization = errors.New("Empty repository organization") ErrUserNotAllowed = errors.New("User not in the allowed set") )
View Source
var ErrSkipGithubEndpoint = errors.New("Github endpoint skipped")
View Source
var ShaLike = regexp.MustCompile("[0-9a-zA-Z]{40}")
Functions ¶
func ContextRun ¶
Run cmd within a net Context. If the context is cancelled or times out, the process is killed.
func GetSubmoduleRev ¶
func GetSubmoduleRevs ¶
func GitCommitTimes ¶
Return the most recent committed timestamp of each file in the whole of history. It's faster than invoking 'git log -1' on each file.
func GitSetMTimes ¶
func MultipleErrors ¶
Read errors out of a channel, counting only the non-nil ones. If there are zero non-nil errs, nil is returned.
func PrepSubmodules ¶
func SafeCleanup ¶
Types ¶
type BuildDirectory ¶
type BuildDirectory struct {
Name, Dir string
Cleanup func()
}
func PrepBuildDirectory ¶
func PrepBuildDirectory( gitDir, remote, ref string, ) (*BuildDirectory, error)
type ErrMultiple ¶
type ErrMultiple struct {
// contains filtered or unexported fields
}
func (*ErrMultiple) Error ¶
func (em *ErrMultiple) Error() string
type GithubStatus ¶
type JustNongithub ¶
type JustNongithub struct {
NonGithub NonGithub `json:"nongithub"`
}
func ParseJustNongithub ¶
func ParseJustNongithub(in []byte) (j JustNongithub, err error)
type Repository ¶
Click to show internal directories.
Click to hide internal directories.