mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Use the correct tool executable. Better mono detection
This commit is contained in:
12
build.cake
12
build.cake
@ -45,7 +45,7 @@ Task("InspectCode")
|
|||||||
var nugetToolPath = GetFiles("./tools/NuGet.CommandLine.*/tools/NuGet.exe").First();
|
var nugetToolPath = GetFiles("./tools/NuGet.CommandLine.*/tools/NuGet.exe").First();
|
||||||
|
|
||||||
if (!IsRunningOnWindows()) {
|
if (!IsRunningOnWindows()) {
|
||||||
RunInpectCodeInMono(nVikaToolPath, nugetToolPath);
|
RunInpectCodeInMono(nugetToolPath, nVikaToolPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,20 +62,14 @@ Task("InspectCode")
|
|||||||
void RunInpectCodeInMono(FilePath nugetToolPath, FilePath nVikaToolPath) {
|
void RunInpectCodeInMono(FilePath nugetToolPath, FilePath nVikaToolPath) {
|
||||||
var inspectcodeToolPath = GetFiles("./tools/NuGet.CommandLine.*/tools/NuGet.exe").First();
|
var inspectcodeToolPath = GetFiles("./tools/NuGet.CommandLine.*/tools/NuGet.exe").First();
|
||||||
|
|
||||||
if (!FileExists("mono")) {
|
if (!StartProcess("mono", "--version") != 0) {
|
||||||
Information("Running on an os other than windows and mono is not installed. Skipping InpectCode.");
|
Information("Running on an os other than windows and mono is not installed. Skipping InpectCode.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StartProcess("mono", $"{nugetToolPath} restore {osuSolution}");
|
StartProcess("mono", $"{nugetToolPath} restore {osuSolution}");
|
||||||
|
|
||||||
StartProcess("mono", @"--o=""inspectcodereport.xml"" --caches-home=""inspectcode"" ");
|
StartProcess("mono", $@"{inspectcodeToolPath} --o=""inspectcodereport.xml"" --caches-home=""inspectcode"" ");
|
||||||
|
|
||||||
InspectCode(osuSolution, new InspectCodeSettings {
|
|
||||||
CachesHome = "inspectcode",
|
|
||||||
OutputFile = "inspectcodereport.xml",
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
StartProcess("mono", $@"{nVikaToolPath} parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
StartProcess("mono", $@"{nVikaToolPath} parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user