From 1a03ef13f4dd29556c629907902425206d4df135 Mon Sep 17 00:00:00 2001 From: miterosan Date: Tue, 7 Aug 2018 22:36:52 +0200 Subject: [PATCH] Revert "Allow running on mono if possible. (non windows)" https://youtrack.jetbrains.com/issue/RSRP-410004 This reverts commit 580d478dc80bafbbe39eede20ff1e9f6dc234dc6. --- build.cake | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/build.cake b/build.cake index ceebbf3d83..6a06f843db 100644 --- a/build.cake +++ b/build.cake @@ -1,4 +1,4 @@ -#addin "nuget:http://localhost:8081/repository/hm?package=CodeFileSanity&version=1.0.10" +#addin "nuget:?package=CodeFileSanity" #addin "nuget:?package=JetBrains.ReSharper.CommandLineTools" #tool "nuget:?package=NVika.MSBuild" #tool "nuget:?package=NuGet.CommandLine" @@ -38,17 +38,14 @@ Task("Test") }); }); +// windows only because both inspectcore and nvika depend on net45 Task("InspectCode") +.WithCriteria(IsRunningOnWindows()) .IsDependentOn("Compile") .Does(() => { var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First(); var nugetToolPath = GetFiles("./tools/NuGet.CommandLine.*/tools/NuGet.exe").First(); - if (!IsRunningOnWindows()) { - RunInpectCodeInMono(nugetToolPath, nVikaToolPath); - return; - } - StartProcess(nugetToolPath, $"restore {osuSolution}"); InspectCode(osuSolution, new InspectCodeSettings { @@ -59,26 +56,6 @@ Task("InspectCode") StartProcess(nVikaToolPath, @"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors"); }); -void RunInpectCodeInMono(FilePath nugetToolPath, FilePath nVikaToolPath) { - var inspectcodeToolPath = GetFiles("./tools/Addins/JetBrains.Resharper.CommandLineTools.*/**/inspectcode.exe").First(); - - var testMonoArguments = new ProcessArgumentBuilder(); - testMonoArguments.AppendSwitch("--version", ""); - - if (StartProcess("mono", new ProcessSettings { - Silent = true, Arguments = testMonoArguments } - ) != 0) { - Information("Running on an os other than windows and mono is not installed. Skipping InpectCode."); - return; - } - - StartProcess("mono", $"{nugetToolPath} restore {osuSolution}"); - - StartProcess("mono", $@"{inspectcodeToolPath} --o=""inspectcodereport.xml"" --caches-home=""inspectcode"" "); - - StartProcess("mono", $@"{nVikaToolPath} parsereport ""inspectcodereport.xml"" --treatwarningsaserrors"); -} - Task("CodeFileSanity") .Does(() => { ValidateCodeSanity(new ValidateCodeSanitySettings {