Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(ctx context.Context, src, targetDir string) error
- func CreateGithubPullRequest(ctx context.Context, repoDir string, title string) error
- func ExecuteQuietPathApplicationWithOutput(ctx context.Context, workingDir, cmd string, args ...string) (lines []string, err error)
- func Exists(filePath string) (fs.FileInfo, bool, error)
- func FindGitDirs(rootPath string) ([]string, error)
- func FindGoRepoDirs(rootPath string) ([]string, error)
- func FindRepoDirs(rootPath string) ([]string, error)
- func GitAddAll(ctx context.Context, repoDir string) error
- func GitBumpVersionTag(ctx context.Context, repoDir, remoteName string, major, minor, patch bool) (err 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 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 GitGetLatestTag(ctx context.Context, repoDir string) (version semver.Version, 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 GoBuildAll(ctx context.Context, repoDir string) error
- func GoFmt(ctx context.Context, repoDir string) error
- func GoGet(ctx context.Context, repoDir string, dependency string) error
- func GoModTidy(ctx context.Context, repoDir string) error
- func IsApplicationAvailable(ctx context.Context, name string) bool
- func NewReplacer(m map[string]string) *strings.Replacer
- func NewUpdatedVersion(versionStr string, major, minor, patch bool) (semver.Version, error)
- func NewVersion(v string) (version semver.Version, err error)
- func ReplaceInDir(rootPath string, exclude, include []*regexp.Regexp, replacer *strings.Replacer) ([]string, error)
- func StripUnsafe(s string) string
- func ToModuleUrl(gitUrl string) (string, error)
- func WalkMatching(rootPath string, exclude, include []*regexp.Regexp, walk filepath.WalkFunc) error
- type ErrExec
Constants ¶
View Source
const Separator = string(filepath.Separator)
Variables ¶
View Source
var (
ErrApplicationNotFound = errors.New("application not found")
)
Functions ¶
func CreateGithubPullRequest ¶
func ExecuteQuietPathApplicationWithOutput ¶
func ExecuteQuietPathApplicationWithOutput(ctx context.Context, workingDir, cmd string, args ...string) (lines []string, err error)
ExecuteQuietPathApplicationWithOutput executes a linux/windows command
func FindGitDirs ¶
func FindGoRepoDirs ¶
FindGoRepoDirs returns the parent directories of all found Go repo directories which are also git directories.
func FindRepoDirs ¶
func GitBumpVersionTag ¶
func GitBumpVersionTag(ctx context.Context, repoDir, remoteName string, major, minor, patch bool) (err error)
Creates a new local version tag BUT does NOT push it. Use GitPushTags(ctx, repoDir, remoteName) to also push the tag to the origin
func GitChangeRemoteUrl ¶
func GitCheckRemoteUrl ¶
func GitCheckoutBranch ¶
func GitCheckoutNewBranch ¶
func GitDeleteBranch ¶
func GitDeleteRemoteBranch ¶
func GitGetBranchName ¶
func GitGetDefaultBranch ¶
func GitGetLatestTag ¶
func GitPullPrune ¶
GitPullPrune removes everything that does not exist in the remote repo
func GitPushUpstream ¶
func GitRemoteUrl ¶
func NewUpdatedVersion ¶
func NewVersion ¶
func ReplaceInDir ¶
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.
func ToModuleUrl ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.