Move analyzer to own solution

This commit is contained in:
Patrik Svensson
2021-07-11 01:15:56 +02:00
committed by Phil Scott
parent d9f06413d0
commit 314e50b531
5 changed files with 109 additions and 54 deletions

View File

@ -4,7 +4,14 @@ var configuration = Argument("configuration", "Release");
////////////////////////////////////////////////////////////////
// Tasks
Task("Clean")
.Does(context =>
{
context.CleanDirectory("./.artifacts");
});
Task("Build")
.IsDependentOn("Clean")
.Does(context =>
{
DotNetCoreBuild("./src/Spectre.Console.sln", new DotNetCoreBuildSettings {
@ -15,7 +22,20 @@ Task("Build")
});
});
Task("Build-Analyzer")
.IsDependentOn("Build")
.Does(context =>
{
DotNetCoreBuild("./src/Spectre.Console.Analyzer.sln", new DotNetCoreBuildSettings {
Configuration = configuration,
NoIncremental = context.HasArgument("rebuild"),
MSBuildSettings = new DotNetCoreMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});
Task("Build-Examples")
.IsDependentOn("Build")
.Does(context =>
{
DotNetCoreBuild("./examples/Examples.sln", new DotNetCoreBuildSettings {
@ -28,6 +48,7 @@ Task("Build-Examples")
Task("Test")
.IsDependentOn("Build")
.IsDependentOn("Build-Analyzer")
.IsDependentOn("Build-Examples")
.Does(context =>
{
@ -48,8 +69,6 @@ Task("Package")
.IsDependentOn("Test")
.Does(context =>
{
context.CleanDirectory("./.artifacts");
context.DotNetCorePack($"./src/Spectre.Console.sln", new DotNetCorePackSettings {
Configuration = configuration,
NoRestore = true,
@ -58,6 +77,15 @@ Task("Package")
MSBuildSettings = new DotNetCoreMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
context.DotNetCorePack($"./src/Spectre.Console.Analyzer.sln", new DotNetCorePackSettings {
Configuration = configuration,
NoRestore = true,
NoBuild = true,
OutputDirectory = "./.artifacts",
MSBuildSettings = new DotNetCoreMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});
Task("Publish-GitHub")