private TokensList LocalModules() { var local = new List <string>(); var workspace = Helper.GetWorkspaceDirectory(Directory.GetCurrentDirectory()); if (workspace != null) { Helper.SetWorkspace(workspace); local = modules.Where(Yaml.Exists).ToList(); } return(TokensList.Create(local)); }
private TokensList RemoteBranches() { var moduleDirectory = Helper.GetModuleDirectory(Directory.GetCurrentDirectory()); if (moduleDirectory == null) { return(null); } var repo = new GitRepository(moduleDirectory, log); var branches = repo.GetRemoteBranches().Select(b => b.Name); return(TokensList.Create(branches)); }
private TokensList MoudleCsprojs() { var moduleDirectory = Helper.GetModuleDirectory(Directory.GetCurrentDirectory()); if (moduleDirectory == null) { return(null); } var moduleName = Path.GetFileName(moduleDirectory); var files = Yaml.GetCsprojsList(moduleName); return(TokensList.Create(CsprojsToShortFormat(files))); }
private TokensList RefAddComplete() { var workspace = Helper.GetWorkspaceDirectory(Directory.GetCurrentDirectory()) ?? Directory.GetCurrentDirectory(); Helper.SetWorkspace(workspace); var local = modules.Where(Yaml.Exists).ToList(); if (lastToken.Contains("/") && local.Contains(lastToken.Split('/')[0])) { var name = lastToken.Split('/')[0]; local.AddRange( Yaml.ConfigurationParser(name).GetConfigurations().Select(c => $"{name}/{c}")); } return(TokensList.Create(local, MoudleCsprojs)); }
private TokensList AllModules() { return(TokensList.Create(modules)); }
private static TokensList ModuleConfigs(string moduleName) { return(TokensList.Create( Yaml.ConfigurationParser(moduleName).GetConfigurations())); }