Пример #1
0
 public bool Build(Dep dep)
 {
     log.Debug($"{dep.ToBuildString()}");
     if (BuildSingleModule(dep))
     {
         return(true);
     }
     log.Debug($"{dep.ToBuildString(),-40} *build failed");
     return(false);
 }
Пример #2
0
 public bool Build(Dep dep)
 {
     try
     {
         log.LogDebug($"{dep.ToBuildString()}");
         if (BuildSingleModule(dep))
         {
             return(true);
         }
         log.LogDebug($"{dep.ToBuildString(),-40} *build failed");
         return(false);
     }
     catch (Exception e)
     {
         log.LogError(e, e.Message);
         ConsoleWriter.Shared.WriteError($"Failed to buid {dep}.\n{e}");
         return(false);
     }
 }
Пример #3
0
        private void PrintBuildResult(Dep dep, string buildName, int warnCount, string elapsedTime, List <string> obsoleteUsages)
        {
            ConsoleWriter.WriteOk(
                $"{dep.ToBuildString() + " " + buildName,-40}{(warnCount == 0 || buildSettings.ShowWarningsSummary ? "" : "warnings: " + warnCount),-15}{elapsedTime,10}");

            var obsoleteCount = obsoleteUsages.Count;

            if (buildSettings.ShowWarningsSummary && warnCount > 0)
            {
                ConsoleWriter.WriteBuildWarning(
                    $"       warnings: {warnCount}{(obsoleteCount == 0 ? "" : ", obsolete usages: " + obsoleteCount)} (Use -w key to print warnings or -W to print obsolete usages. You can also use ReSharper to find them.)");
            }
        }
Пример #4
0
 private bool Build(Dep dep, string moduleYaml, string cmdFile)
 {
     if (File.Exists(moduleYaml))
     {
         var scripts = BuildYamlScriptsMaker.PrepareBuildScriptsFromYaml(dep);
         if (scripts.Any(script => script != null))
         {
             return(scripts.All(script => RunBuildScript(dep, script)));
         }
     }
     if (File.Exists(cmdFile))
     {
         return(BuildByCmd(dep, cmdFile));
     }
     ConsoleWriter.WriteSkip($"{dep.ToBuildString(),-40}*content");
     return(true);
 }