Documentation
¶
Index ¶
Constants ¶
View Source
const RepoCacheDirEnv = "KPT_CACHE_DIR"
RepoCacheDirEnv is the name of the environment variable that controls the cache directory for remote repos. Defaults to UserHomeDir/.kpt/repos if unspecified.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRunner ¶
type GitRunner struct {
// Dir is the directory the commands are run in.
Dir string
// RepoDir is the directory of the git repo containing the package
RepoDir string
// Stderr is where the git command Stderr is written
Stderr *bytes.Buffer
// Stdin is where the git command Stdin is read from
Stdin *bytes.Buffer
// Stdout is where the git command Stdout is written
Stdout *bytes.Buffer
// Verbose prints verbose command information
Verbose bool
}
GitRunner runs git commands in a git repo.
func NewLocalGitRunner ¶
NewLocalGitRunner returns a new GitRunner for a local package.
func NewUpstreamGitRunner ¶
func NewUpstreamGitRunner(uri, dir string, required []string, optional []string) (*GitRunner, error)
NewUpstreamGitRunner returns a new GitRunner for an upstream package.
The upstream package repo will be fetched to a local cache directory under $HOME/.kpt and hard reset to origin/master. The refs will also be fetched so they are available locally.
Click to show internal directories.
Click to hide internal directories.