mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-04 11:48:16 +08:00
Move analyzer to own solution
This commit is contained in:

committed by
Phil Scott

parent
d9f06413d0
commit
314e50b531
32
build.cake
32
build.cake
@ -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")
|
||||
|
Reference in New Issue
Block a user