chore: Add comments to public methods
- rename GetRepo to GetDirectoryForRegisteredRepo so it's actually doing what it says
This commit is contained in:
parent
ba07e1618a
commit
fc3fe217e4
7 changed files with 57 additions and 5 deletions
|
|
@ -33,7 +33,17 @@ public class BuildContext : FrostingContext
|
|||
/// </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)
|
||||
|
|
@ -45,7 +55,7 @@ public class BuildContext : FrostingContext
|
|||
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));
|
||||
BuildSuffix = context.Configuration.GetValue(nameof(BuildSuffix)) ?? "pre-release";
|
||||
DisableCommitHash = context.Configuration.GetBoolValue(nameof(DisableCommitHash));
|
||||
}
|
||||
}
|
||||
|
|
@ -6,8 +6,14 @@ namespace Build;
|
|||
|
||||
public class Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a formatted version of the assembly that contains PowerShell cmdlets
|
||||
/// </summary>
|
||||
/// <param name="powershelModuleOutputLocation"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPowershellModuleVersion(string powershelModuleOutputLocation)
|
||||
{
|
||||
// When the project name changes, this dll will also need to be updated
|
||||
var moduleVersionInfo = FileVersionInfo.GetVersionInfo(Path.Combine(powershelModuleOutputLocation, "PowershellModule.dll"));
|
||||
|
||||
// It's (almost) impossible to not have a product version tag here. There is a reason why the implementation
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ public static class Program
|
|||
{
|
||||
return new CakeHost()
|
||||
.UseContext<BuildContext>()
|
||||
// Uncomment this if you don't want to set the suffix via the run profile program arguments
|
||||
.UseCakeSetting(nameof(BuildContext.BuildSuffix), "pre-release")
|
||||
.Run(args);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue