从git下载相关文件
(gitCloneUrl string, branch string, filePathExpression string)
| 923 | |
| 924 | // 从git下载相关文件 |
| 925 | func downloadFilesByGit(gitCloneUrl string, branch string, filePathExpression string) ( |
| 926 | gitRepoRootDirPath string, fileRelativePaths []string, err error) { |
| 927 | // home 目录的路径 |
| 928 | home, err := os.UserHomeDir() |
| 929 | if err != nil { |
| 930 | return |
| 931 | } |
| 932 | |
| 933 | // 文件路径 |
| 934 | workingRootDir := filepath.Join(home, globalModel.CONST_GlobalK8sDirPath) // 工作目录,repo 会clone到当前目录下 |
| 935 | return common.GIT.DownloadFilesByGit(workingRootDir, gitCloneUrl, branch, filePathExpression) |
| 936 | } |
| 937 | |
| 938 | const ( |
| 939 | Flags_ServerHost = "serverhost" |
no test coverage detected