feat: add Cake build to produce powershell module (#2)
- Add Cake build project - Change to CPM - Package bumps for security bumps - Reorganise solution structure to group harness projects
This commit is contained in:
parent
274d279732
commit
ecb0a20cbb
27 changed files with 267 additions and 58 deletions
36
build/Tasks/BuildTask.cs
Normal file
36
build/Tasks/BuildTask.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue