Esempio n. 1
0
        protected override int Execute()
        {
            var response = usagesProvider.GetUsages(module, branch, configuration);

            if (printEdges)
            {
                Console.WriteLine(";Copy paste this text to http://arborjs.org/halfviz/#");
                foreach (var item in response.Items)
                {
                    PrintArborjsInfo(item);
                }
            }
            else
            {
                foreach (var item in response.Items)
                {
                    PrintInfo(item);
                }
                PrintFooter(response.UpdatedTime);
            }

            return(0);
        }
Esempio n. 2
0
        protected override int Execute()
        {
            cwd               = Directory.GetCurrentDirectory();
            workspace         = Directory.GetParent(cwd).FullName;
            moduleName        = Path.GetFileName(cwd);
            currentRepository = new GitRepository(moduleName, workspace, Log);

            if (currentRepository.HasLocalChanges())
            {
                throw new CementException("You have uncommited changes");
            }
            branch = currentRepository.CurrentLocalTreeish().Value;
            if (checkingBranch == null)
            {
                checkingBranch = branch;
            }

            var response = usagesProvider.GetUsages(moduleName, checkingBranch);

            var toBuild = response.Items.SelectMany(kvp => kvp.Value).Where(d => d.Treeish == "master").ToList();

            BuildDeps(toBuild);
            return(0);
        }