feat: Add GitRepoRegistration cmdlets (#5)
- adds GitRepoRegistration cmdlets - adds basic tests for GitRepoRegistration implementations - adds initial build project and scripts Refs: #5, #6
This commit is contained in:
parent
3547e32b6e
commit
5c09b7c5a8
66 changed files with 1619 additions and 142 deletions
61
build/BuildContext.cs
Normal file
61
build/BuildContext.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
using Cake.Common.IO;
|
||||
using Cake.Common.IO.Paths;
|
||||
using Cake.Core;
|
||||
using Cake.Core.IO;
|
||||
using Cake.Frosting;
|
||||
|
||||
namespace Build;
|
||||
|
||||
public class BuildContext : FrostingContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Base source directory
|
||||
/// </summary>
|
||||
public DirectoryPath BaseSourceLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Powershell module project folder
|
||||
/// </summary>
|
||||
public ConvertableDirectoryPath PowershellModuleProjectDirectory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Powershell module csproj location
|
||||
/// </summary>
|
||||
public ConvertableFilePath PowershellModuleCsproj { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Output directory for built DLLs and powershell module manifest files
|
||||
/// </summary>
|
||||
public ConvertableDirectoryPath PowershellModuleOutputDir { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path to powershell script that creates the module manifest files
|
||||
/// </summary>
|
||||
public ConvertableFilePath CreateModuleManifestScript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Suffix to tag the build with, defaults to pre-release.
|
||||
/// <para>
|
||||
/// Immediately follows the version number and before the commit hash.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public string BuildSuffix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disable the commit hash from being added
|
||||
/// </summary>
|
||||
public bool DisableCommitHash { get; set; }
|
||||
|
||||
public BuildContext(ICakeContext context)
|
||||
: base(context)
|
||||
{
|
||||
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");
|
||||
var buildScriptDirectory = context.Directory("./Scripts");
|
||||
CreateModuleManifestScript = buildScriptDirectory + context.File("CreateModuleManifest.ps1");
|
||||
BuildSuffix = context.Configuration.GetValue(nameof(BuildSuffix)) ?? "pre-release";
|
||||
DisableCommitHash = context.Configuration.GetBoolValue(nameof(DisableCommitHash));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue