Ejemplo n.º 1
0
        private string GetDepLine(Dep dep)
        {
            var parser = new ConfigurationYamlParser(new FileInfo(Path.Combine(workspace, dep.Name)));

            if (parser.GetDefaultConfigurationName() == dep.Configuration)
            {
                dep.Configuration = null;
            }
            return(dep.ToYamlString());
        }
Ejemplo n.º 2
0
        public static void PatchDepsForSolution(string currentModuleFullPath, Dep dep, string solutionFile)
        {
            var installData = InstallParser.Get(dep.Name, dep.Configuration);

            Log.Info("Adding deps to module.yaml");
            Log.Info("Getting cement configurations insert to");
            var usedConfigs = GetUsedCementConfigsForSolution(currentModuleFullPath, solutionFile);
            var toPatch     = GetSmallerCementConfigs(currentModuleFullPath, usedConfigs);

            PatchDeps(
                currentModuleFullPath,
                installData.ExternalModules.Concat(new[] { dep.ToYamlString() }).ToList(),
                toPatch);
        }