|
|
@ -176,10 +176,15 @@ func Pull(repoPath string, opts PullRemoteOptions) error { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// PushWithEnvs pushs local commits to given remote branch with given environment variables.
|
|
|
|
|
|
|
|
func PushWithEnvs(repoPath, remote, branch string, envs []string) error { |
|
|
|
|
|
|
|
_, err := NewCommand("push", remote, branch).AddEnvs(envs...).RunInDir(repoPath) |
|
|
|
|
|
|
|
return err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Push pushs local commits to given remote branch.
|
|
|
|
// Push pushs local commits to given remote branch.
|
|
|
|
func Push(repoPath, remote, branch string) error { |
|
|
|
func Push(repoPath, remote, branch string) error { |
|
|
|
_, err := NewCommand("push", remote, branch).RunInDir(repoPath) |
|
|
|
return PushWithEnvs(repoPath, remote, branch, nil) |
|
|
|
return err |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type CheckoutOptions struct { |
|
|
|
type CheckoutOptions struct { |
|
|
|