Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
        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);
        }