feat(build): Create helpers and TagCommit step

- adjust the BaseSourceLocation to be absolute
- refactor getting the PowershellModule version to Helpers.cs
This commit is contained in:
Scott 2026-09-04 17:40:51 +10:00
commit 1a8bdec589
5 changed files with 103 additions and 38 deletions

View file

@ -1,6 +1,7 @@
using Cake.Common.IO;
using Cake.Common.IO.Paths;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
namespace Build;
@ -10,7 +11,7 @@ public class BuildContext : FrostingContext
/// <summary>
/// Base source directory
/// </summary>
public ConvertableDirectoryPath BaseSourceLocation { get; set; }
public DirectoryPath BaseSourceLocation { get; set; }
/// <summary>
/// Powershell module project folder
@ -38,7 +39,7 @@ public class BuildContext : FrostingContext
public BuildContext(ICakeContext context)
: base(context)
{
BaseSourceLocation = context.Directory("../src");
BaseSourceLocation = context.Directory("../src").Path.MakeAbsolute(context.Environment);
PowershellModuleProjectDirectory = BaseSourceLocation + context.Directory("PowershellModule");
PowershellModuleCsproj = PowershellModuleProjectDirectory + context.File("PowershellModule.csproj");
PowershellModuleOutputDir = context.Directory("../") + context.Directory("output") + context.Directory("PowershellModule");