Documentation ¶
Index ¶
- func BashCmdExec(cmd string, workingDir string, environ []string, logPrefix string) error
- func CmdExec(cmdName string, cmdArgs []string, workingDir string, environ []string, ...) error
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func FileExists(filePath string) bool
- func GitCheckout(repoPath string, branchName string) error
- func GitClone(parentPath string, repositoryName string, gitRemote string) (string, error)
- func GitCommit(repoPath string, message string) error
- func GitFetch(repoPath string, remoteRef string, localBranchName string) error
- func GitFindNearestTagName(repoPath string) (string, error)
- func GitGenerateChangelog(repoPath string, baseSha string, headSha string) (string, error)
- func GitGenerateGitIgnore(repoPath string, ignoreType string) error
- func GitGetTagDetails(repoPath string, tagName string) (*pipeline.GitTagDetails, error)
- func GitPush(repoPath string, localBranch string, remoteBranch string) error
- func GitTag(repoPath string, version string) (string, error)
- func LeftPad(s string, padStr string, pLen int) string
- func LeftPad2Len(s string, padStr string, overallLen int) string
- func RightPad(s string, padStr string, pLen int) string
- func RightPad2Len(s string, padStr string, overallLen int) string
- func SnakeCaseToCamelCase(inputUnderScoreStr string) (camelCase string)
- func StripIndent(multilineStr string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BashCmdExec ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func FileExists ¶
func GitCheckout ¶
func GitClone ¶
Clone a git repo into a local directory. Credentials need to be specified by embedding in gitRemote url. TODO: this pattern may not work on Bitbucket/GitLab
func GitFindNearestTagName ¶
Get the nearest tag on branch. tag must be nearest, ie. sorted by their distance from the HEAD of the branch, not the date or tagname. basically `git describe --tags --abbrev=0`
func GitGenerateChangelog ¶
func GitGenerateGitIgnore ¶
func GitGetTagDetails ¶
func GitGetTagDetails(repoPath string, tagName string) (*pipeline.GitTagDetails, error)
func SnakeCaseToCamelCase ¶
func StripIndent ¶
Types ¶
This section is empty.