Documentation
¶
Index ¶
- type Runner
- func (r *Runner) ArchiveModule(tag, modulePath, destPath string) error
- func (r *Runner) CreateTag(tag, message string) error
- func (r *Runner) CurrentBranch() (string, error)
- func (r *Runner) ExtractModuleAtTag(tag, modulePath string) (string, func(), error)
- func (r *Runner) Fetch() error
- func (r *Runner) IsClean() (bool, error)
- func (r *Runner) IsUpToDate(branch string) (bool, error)
- func (r *Runner) ListFilesAtTag(tag, path string) ([]string, error)
- func (r *Runner) ListTags() ([]string, error)
- func (r *Runner) ListTagsWithPrefix(prefix string) ([]string, error)
- func (r *Runner) ModuleHasChanges(tag, modulePath string) (bool, error)
- func (r *Runner) PathExistsAtTag(tag, path string) (bool, error)
- func (r *Runner) PushTag(tag string) error
- func (r *Runner) ShowFileAtTag(tag, path string) (string, error)
- func (r *Runner) TagExists(tag string) (bool, error)
- func (r *Runner) TopLevel() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
RepoPath string
}
Runner executes git commands against a repository.
func (*Runner) ArchiveModule ¶
ArchiveModule creates a tar.gz archive of the module directory at the given tag's commit. It writes to destPath. Files are placed at the root of the archive (no directory prefix).
func (*Runner) CurrentBranch ¶
CurrentBranch returns the current branch name.
func (*Runner) ExtractModuleAtTag ¶
ExtractModuleAtTag extracts a module directory at a given tag into a temporary directory and returns its path. The caller must call the returned cleanup function when done.
func (*Runner) IsUpToDate ¶
IsUpToDate checks if the local branch is up to date with its remote tracking branch.
func (*Runner) ListFilesAtTag ¶
ListFilesAtTag lists files under a path at a given tag.
func (*Runner) ListTagsWithPrefix ¶
ListTagsWithPrefix returns tags matching a given prefix.
func (*Runner) ModuleHasChanges ¶
ModuleHasChanges reports whether the given module path has changes between the specified tag and HEAD.
func (*Runner) PathExistsAtTag ¶
PathExistsAtTag checks if a path exists in the tree at the given tag.
func (*Runner) ShowFileAtTag ¶
ShowFileAtTag returns the contents of a file at a given tag. Returns empty string and no error if the file does not exist.