mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00:00
47 lines
1.3 KiB
C#
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); |