private static string GetWave(ReSharperSettingsBase toolSettings) { return(Directory.GetParent(toolSettings.ProcessToolPath) .DescendantsAndSelf(x => x.Parent) .Select(x => Path.Combine(x.FullName, "jetbrains.resharper.globaltools.nuspec")) .Where(File.Exists) .Select(x => new FileInfo(x).Directory.NotNull().Name) .Select(x => $"{x[2]}{x[3]}{x[5]}") .SingleOrDefault()); }
private static string GetShadowDirectory(ReSharperSettingsBase toolSettings, string wave) { var hashCode = toolSettings.ProcessToolPath.Concat(toolSettings.Plugins.Select(x => x.Key + x.Value)).OrderBy(x => x).JoinComma().GetMD5Hash(); return(Path.Combine(NukeBuild.TemporaryDirectory, $"ReSharper-{wave}-{hashCode.Substring(startIndex: 0, length: 4)}")); }
private static IProcess StartProcess(ReSharperSettingsBase toolSettings) { return(ProcessTasks.StartProcess(toolSettings)); }