Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
in the prepare release the parameter "commitMessagePattern" should ha…
…ve as default value "{0}" before the default was null and had error on some unit test
  • Loading branch information
fmacavilca committed Nov 9, 2023
commit b5b8a5e15784f2d42f7fd3dbef82df39d70ee5bb
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/ReleaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public enum ReleaseManagerOutputMode
/// <param name="commitMessagePattern">
/// Custom pattern to add a prefix or suffix to the default commit message.
/// </param>
public void PrepareRelease(string projectDirectory, string releaseUnstableTag = null, Version nextVersion = null, VersionOptions.ReleaseVersionIncrement? versionIncrement = null, ReleaseManagerOutputMode outputMode = default, string commitMessagePattern = null)
public void PrepareRelease(string projectDirectory, string releaseUnstableTag = null, Version nextVersion = null, VersionOptions.ReleaseVersionIncrement? versionIncrement = null, ReleaseManagerOutputMode outputMode = default, string commitMessagePattern = "{0}")
{
Requires.NotNull(projectDirectory, nameof(projectDirectory));

Expand Down
5 changes: 0 additions & 5 deletions src/nbgv/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@ private static Task<int> OnPrepareReleaseCommand(string project, string nextVers
}

// validate commit message pattern
if (string.IsNullOrEmpty(commitMessagePattern))
{
commitMessagePattern = "{0}";
}

if (AreCurlyBracesBalanced(commitMessagePattern))
{
Console.Error.WriteLine("Commit message pattern contains unbalanced curly braces.");
Expand Down