(dep models.Dependency)
| 18 | ) |
| 19 | |
| 20 | func CloneCacheEmbedded(dep models.Dependency) *git.Repository { |
| 21 | msg.Info("Downloading dependency %s", dep.Repository) |
| 22 | storageCache := makeStorageCache(dep) |
| 23 | wtFs := makeWtFileSystem(dep) |
| 24 | url := dep.GetURL() |
| 25 | auth := env.GlobalConfiguration.GetAuth(dep.GetURLPrefix()) |
| 26 | |
| 27 | repository, e := git.Clone(storageCache, wtFs, &git.CloneOptions{ |
| 28 | URL: url, |
| 29 | Tags: git.AllTags, |
| 30 | Auth: auth, |
| 31 | }) |
| 32 | if e != nil { |
| 33 | _ = os.RemoveAll(filepath.Join(env.GetCacheDir(), dep.GetHashName())) |
| 34 | msg.Die("Error to get repository of %s: %s", dep.Repository, e) |
| 35 | } |
| 36 | initSubmodules(dep, repository) |
| 37 | return repository |
| 38 | } |
| 39 | |
| 40 | func UpdateCacheEmbedded(dep models.Dependency) *git.Repository { |
| 41 | storageCache := makeStorageCache(dep) |
no test coverage detected