mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Add dotnet format check in CI.
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
"commands": [
|
||||
"dotnet-cake"
|
||||
]
|
||||
},
|
||||
"dotnet-format": {
|
||||
"version": "3.1.37601",
|
||||
"commands": [
|
||||
"dotnet-format"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ var rootDirectory = new DirectoryPath("..");
|
||||
var tempDirectory = new DirectoryPath("temp");
|
||||
var artifactsDirectory = rootDirectory.Combine("artifacts");
|
||||
|
||||
var sln = rootDirectory.CombineWithFilePath("osu-framework.sln");
|
||||
var desktopBuilds = rootDirectory.CombineWithFilePath("build/Desktop.proj");
|
||||
var desktopSlnf = rootDirectory.CombineWithFilePath("osu-framework.Desktop.slnf");
|
||||
var frameworkProject = rootDirectory.CombineWithFilePath("osu.Framework/osu.Framework.csproj");
|
||||
@@ -131,6 +132,9 @@ Task("CodeFileSanity")
|
||||
});
|
||||
});
|
||||
|
||||
Task("DotnetFormat")
|
||||
.Does(() => DotNetCoreTool(sln.FullPath, "format", "--dry-run --check"));
|
||||
|
||||
Task("PackFramework")
|
||||
.Does(() => {
|
||||
DotNetCorePack(frameworkProject.FullPath, new DotNetCorePackSettings{
|
||||
@@ -212,6 +216,7 @@ Task("Build")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("DetermineAppveyorBuildProperties")
|
||||
.IsDependentOn("CodeFileSanity")
|
||||
.IsDependentOn("DotnetFormat")
|
||||
.IsDependentOn("InspectCode")
|
||||
.IsDependentOn("Test")
|
||||
.IsDependentOn("DetermineAppveyorDeployProperties")
|
||||
|
||||
Reference in New Issue
Block a user