Пример #1
0
 private void SetVersionsIfAvailable(IFileInfo logPath)
 {
     foreach (string line in filesystem.ReadLines(logPath))
     {
         Match match = VERSION_REGEX.Match(line);
         if (match.Success)
         {
             foreach (SDModule module in modules)
             {
                 if (line.Contains(module.FilePath))
                 {
                     module.Version = match.Groups[1].Value;
                 }
             }
         }
     }
 }
Пример #2
0
        private string GetExecutableFromSummary()
        {
            IFileInfo summaryTxt = filesystem.GetFile(Constants.SUMMARY_TXT);

            if (!summaryTxt.Exists)
            {
                return(null);
            }

            return(filesystem.ReadLines(summaryTxt).Select(line => {
                Match match = EXECUTABLE_REGEX.Match(line);
                if (match.Success)
                {
                    return match.Groups[1].Value;
                }
                return "";
            }).FirstOrDefault(match => match != ""));
        }