osu/build.cake
2018-07-29 20:49:26 +02:00

47 lines
1.3 KiB
C#

#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
///////////////////////////////////////////////////////////////////////////////
// ARGUMENTS
///////////////////////////////////////////////////////////////////////////////
var target = Argument("target", "Build");
var framework = Argument("framework", "net471");
var configuration = Argument("configuration", "Release");
var osuDesktop = new FilePath("./osu.Desktop/osu.Desktop.csproj");
var testProjects = GetFiles("**/*.Tests.csproj");
///////////////////////////////////////////////////////////////////////////////
// TASKS
///////////////////////////////////////////////////////////////////////////////
Task("Compile")
.Does(() => {
DotNetCoreBuild(osuDesktop.FullPath, new DotNetCoreBuildSettings {
Framework = framework,
Configuration = configuration
});
});
Task("Test")
.ContinueOnError()
.DoesForEach(testProjects, testProject => {
DotNetCoreTest(testProject.FullPath, new DotNetCoreTestSettings {
Framework = framework,
Configuration = configuration,
Logger = $"trx;LogFileName={testProject.GetFilename()}.trx",
ResultsDirectory = "./TestResults/"
});
});
Task("InspectCode")
.Does(() => {
});
Task("Build")
.IsDependentOn("Compile")
.IsDependentOn("Test");
RunTarget(target);