- Add Cake build project - Change to CPM - Package bumps for security bumps - Reorganise solution structure to group harness projects
36 lines
No EOL
982 B
C#
36 lines
No EOL
982 B
C#
using Cake.Common.Tools.DotNet;
|
|
using Cake.Common.Tools.DotNet.Build;
|
|
using Cake.Common.Tools.DotNet.MSBuild;
|
|
using Cake.Core.Diagnostics;
|
|
using Cake.Frosting;
|
|
|
|
namespace Build.Tasks;
|
|
|
|
[TaskName("Build")]
|
|
[IsDependentOn(typeof(CleanTask))]
|
|
[IsDependeeOf(typeof(CopyOutputTask))]
|
|
public class BuildTask : FrostingTask<BuildContext>
|
|
{
|
|
public override void Run(BuildContext context)
|
|
{
|
|
context.Log.Information($"Building: {context.PowershellModuleCsproj}");
|
|
|
|
var buildSettings = new DotNetBuildSettings()
|
|
{
|
|
MSBuildSettings = new DotNetMSBuildSettings()
|
|
{
|
|
VersionSuffix = "cake"
|
|
},
|
|
OutputDirectory = context.PowershellModuleOutputDir,
|
|
DiagnosticOutput = true
|
|
};
|
|
|
|
// /p:DebugSymbols=false
|
|
buildSettings.MSBuildSettings.Properties.Add("DebugSymbols", ["false"]);
|
|
// /p:DebugType=None
|
|
buildSettings.MSBuildSettings.Properties.Add("DebugType", ["None"]);
|
|
|
|
context.DotNetBuild(context.PowershellModuleCsproj, buildSettings);
|
|
base.Run(context);
|
|
}
|
|
} |