From fce2be9dc7118db2caa6a32729f9fb709d4f68bd Mon Sep 17 00:00:00 2001 From: miterosan Date: Sun, 5 Aug 2018 22:24:52 +0200 Subject: [PATCH] Allow running inspect core with cakeclr. Sadly window only because nvika and resharper cmd tools require net45. --- build.cake | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build.cake b/build.cake index 20b2685351..a341e93a0b 100644 --- a/build.cake +++ b/build.cake @@ -1,7 +1,7 @@ +#addin "nuget:?package=CodeFileSanity" #addin "nuget:?package=JetBrains.ReSharper.CommandLineTools" #tool "nuget:?package=NVika.MSBuild" -#addin "nuget:?package=CodeFileSanity" -var NVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First(); +#tool "nuget:?package=NuGet.CommandLine" /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS @@ -38,13 +38,17 @@ Task("Test") }); }); -Task("Restore Nuget") -.Does(() => NuGetRestore(osuSolution)); - +// windows only because both inspectcore and nvike depend on net45 +// will be ignored on linux Task("InspectCode") -.IsDependentOn("Restore Nuget") +.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(); + + StartProcess(NugetToolPath, $"restore {osuSolution}"); + InspectCode(osuSolution, new InspectCodeSettings { CachesHome = "inspectcode", OutputFile = "inspectcodereport.xml",