mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Use the correct tool executable. Better mono detection
This commit is contained in:
parent
058a6d9e13
commit
2b293add9e
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");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user