public void GetDeps() { rootRepo = new GitRepository(rootModule.Name, Helper.CurrentWorkspace, Log); rootRepoTreeish = rootRepo.CurrentLocalTreeish().Value; var depsContent = new DepsParser(rootRepo.RepoPath).Get(rootModule.Configuration); if (!Directory.Exists(Path.Combine(Helper.CurrentWorkspace, "nuget")) && modules.Any(m => m.Name == "nuget")) { depsContent.Deps.Add(new Dep("nuget")); } depsContent.Force = Helper.DefineForce(depsContent.Force, rootRepo); Log.Info("OK"); var queue = new DepsQueue(); queue.AddRange(depsContent.Deps, rootModule.Name); var proceed = new ModulesContainer(); GetDeps(depsContent.Force, queue, proceed); CycleDetector.WarnIfCycle(rootModule.Name, rootModule.Configuration, Log); }
public ModuleGetter(List <Module> modules, Dep rootModule, LocalChangesPolicy userLocalChangesPolicy, string mergedBranch, bool verbose = false, bool localBranchForce = false, int?gitDepth = null) { this.modules = modules; this.rootModule = rootModule; this.userLocalChangesPolicy = userLocalChangesPolicy; this.localBranchForce = localBranchForce; this.gitDepth = gitDepth; this.verbose = verbose; this.mergedBranch = mergedBranch; cycleDetector = new CycleDetector(); }
public void GetDeps() { rootRepo = new GitRepository(rootModule.Name, Helper.CurrentWorkspace, Log); rootRepoTreeish = rootRepo.CurrentLocalTreeish().Value; var depsContent = new DepsParser(rootRepo.RepoPath).Get(rootModule.Configuration); depsContent.Force = depsContent.Force?.Select(f => Helper.DefineForce(f, rootRepo)).ToArray(); Log.LogInformation("OK"); var queue = new DepsQueue(); queue.AddRange(depsContent.Deps, rootModule.Name); var proceed = new ModulesContainer(); GetDeps(depsContent.Force, queue, proceed); CycleDetector.WarnIfCycle(rootModule.Name, rootModule.Configuration, Log); }