Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(ctx context.Context, src, targetDir string) error
- func ExecutePathApplication(ctx context.Context, workingDir, cmd string, args ...string) (err error)
- func ExecuteQuietPathApplicationWithOutput(ctx context.Context, workingDir, cmd string, args ...string) (lines []string, err error)
- func Exists(filePath string) (fs.FileInfo, bool, error)
- func ExistsDir(dirPath string) (bool, error)
- func ExistsFile(filePath string) (bool, error)
- func GitAddAll(ctx context.Context, repoDir string) error
- func GitChangeRemoteUrl(ctx context.Context, repoDir, remoteName, targetUrl string) error
- func GitCheckRemoteUrl(ctx context.Context, repoDir, targetUrl string) error
- func GitCheckoutBranch(ctx context.Context, repoDir string, targetBranch string) error
- func GitCheckoutNewBranch(ctx context.Context, repoDir string, targetBranch string) (err error)
- func GitCloneBranch(ctx context.Context, repoDir, repoUrl, branchName string, depth ...int) error
- func GitCommit(ctx context.Context, repoDir string, message string) error
- func GitCreateTag(ctx context.Context, repoDir, tagName string) (err error)
- func GitDeleteBranch(ctx context.Context, repoDir string, targetBranch string) error
- func GitDeleteRemoteBranch(ctx context.Context, repoDir string, remoteName, targetBranch string) error
- func GitExistsBranch(ctx context.Context, repoDir, branchName string) bool
- func GitFetchPrune(ctx context.Context, repoDir string) error
- func GitGetBranchName(ctx context.Context, repoDir string) (branch string, err error)
- func GitGetDefaultBranch(ctx context.Context, repoDir, remoteName string) (branchName string, err error)
- func GitPull(ctx context.Context, repoDir string) error
- func GitPullPrune(ctx context.Context, repoDir string) error
- func GitPushTags(ctx context.Context, repoDir, remoteName string) (err error)
- func GitPushUpstream(ctx context.Context, repoDir string, remoteName, targetBranch string) error
- func GitRefreshIndex(ctx context.Context, repoDir string) error
- func GitRemoteUrl(ctx context.Context, repoDir, remoteName string) (url string, err error)
- func IsApplicationAvailable(ctx context.Context, name string) bool
- func MustExistDir(dirPath string) error
- func MustExistFile(filePath string) error
- func StripUnsafe(s string) string
- type ErrExec
Constants ¶
View Source
const ( ListSeparator = "," FilePathSeparator = string(filepath.Separator) )
Variables ¶
View Source
var (
ErrApplicationNotFound = errors.New("application not found")
)
Functions ¶
func ExecutePathApplication ¶
func ExecutePathApplication(ctx context.Context, workingDir, cmd string, args ...string) (err error)
ExecutePathApplication executes a linux/windows command
func ExecuteQuietPathApplicationWithOutput ¶
func ExecuteQuietPathApplicationWithOutput(ctx context.Context, workingDir, cmd string, args ...string) (lines []string, err error)
ExecuteQuietPathApplicationWithOutput executes a linux/windows command
func ExistsFile ¶
func GitChangeRemoteUrl ¶
func GitCheckRemoteUrl ¶
func GitCheckoutBranch ¶
func GitCheckoutNewBranch ¶
func GitCloneBranch ¶
func GitDeleteBranch ¶
func GitDeleteRemoteBranch ¶
func GitGetBranchName ¶
func GitGetDefaultBranch ¶
func GitPullPrune ¶
GitPullPrune removes everything that does not exist in the remote repo
func GitPushUpstream ¶
func GitRemoteUrl ¶
func MustExistDir ¶
func MustExistFile ¶
func StripUnsafe ¶
StripUnsafe remove non-printable runes, e.g. control characters in a string that is meant for consumption by terminals that support control characters.
Types ¶
Click to show internal directories.
Click to hide internal directories.