private void PrintModule(Module module) { ConsoleWriter.WriteProgress(module.Name); var workspace = Helper.GetWorkspaceDirectory(Directory.GetCurrentDirectory()) ?? Directory.GetCurrentDirectory(); if ((bool)parsedArgs["all"] || (bool)parsedArgs["local"] && Helper.DirectoryContainsModule(workspace, module.Name)) { if (parsedArgs["branch"] != null && !GitRepository.HasRemoteBranch(module.Url, (string)parsedArgs["branch"])) { return; } ConsoleWriter.ClearLine(); Console.Write("{0, -30}", module.Name); if ((bool)parsedArgs["url"]) { Console.Write("{0, -60}", module.Url); } if ((bool)parsedArgs["pushurl"]) { Console.Write(module.Url); } Console.WriteLine(); } }
private void PrintPackage(Package package) { Console.WriteLine("[{0}]", package.Name); var modules = Helper.GetModulesFromPackage(package).OrderBy(m => m.Name); foreach (var module in modules) { PrintModule(module); } ConsoleWriter.ClearLine(); }
public int Run(string[] args) { ParseArgs(args); if (simple) { PrintSimpleLocalWithYaml(); return(0); } PackageUpdater.UpdatePackages(); var packages = Helper.GetPackages(); foreach (var package in packages) { PrintPackage(package); } ConsoleWriter.ClearLine(); return(0); }