Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit eb3f046

Browse files
author
Jérémie Bertrand
committed
Add GroupBy option
1 parent ad2202c commit eb3f046

4 files changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Parameters:
2121
- `-o=[filename]`: Path of the resulting file (default: ReleaseNotes.html
2222
- `-t=[file|environment]`: Type of output (default: file)
2323
- `-f=[Html|Markdown]`: Format of the resulting file [(default: Html)
24+
- `-g=[Sections|Categories]`: Defines the grouping of items (default: Sections)
2425
- `--template`: Path of the liquid template file to format the result ; Overrides type and format of output
2526
- `--debug`: add debug messages
2627
- `-h`: help

SemanticReleaseNotesParser.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SemanticReleaseNotesParser.
1111
EndProject
1212
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SemanticReleaseNotesParser.Tests", "SemanticReleaseNotesParser.Tests\SemanticReleaseNotesParser.Tests.csproj", "{6FC85324-7E4B-4856-9F34-B3EA4362733F}"
1313
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E70C1C84-0FF5-4551-A500-4FDD56AA4E8D}"
15+
ProjectSection(SolutionItems) = preProject
16+
appveyor.yml = appveyor.yml
17+
README.md = README.md
18+
ReleaseNotes.md = ReleaseNotes.md
19+
EndProjectSection
20+
EndProject
1421
Global
1522
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1623
Debug|Any CPU = Debug|Any CPU

SemanticReleaseNotesParser/Arguments.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ internal class Arguments : OptionSet
2222

2323
public OutputFormat OutputFormat { get; private set; }
2424

25+
public GroupBy GroupBy { get; set; }
26+
2527
private Arguments()
2628
{
2729
Add("r|releasenotes=", "Release notes file path to parse (default: ReleaseNotes.md)", r => ReleaseNotesPath = r);
2830
Add("o|outputfile=", "Path of the resulting file (default: ReleaseNotes.html", o => ResultFilePath = o);
2931
Add<OutputType>("t|outputtype=", "Type of output [file|environment] (default: file)", t => OutputType = t);
3032
Add<OutputFormat>("f|outputformat=", "Format of the resulting file [Html|Markdown] (default: Html)", f => OutputFormat = f);
33+
Add<GroupBy>("g|groupby=", "Defines the grouping of items [Sections|Categories] (default: Sections)", g => GroupBy = g);
3134
Add("template=", "Path of the liquid template file to format the result", t => TemplatePath = t);
3235
Add("debug", "Debug mode, more messages are logged", d => Debug = true);
3336
Add("h|?|help", "Help", h => Help = true);

SemanticReleaseNotesParser/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static int Run(string[] args)
7373
template = FileSystem.File.ReadAllText(arguments.TemplatePath);
7474
}
7575

76-
var formatterSettings = new SemanticReleaseNotesFormatterSettings { OutputFormat = arguments.OutputFormat, LiquidTemplate = template };
76+
var formatterSettings = new SemanticReleaseNotesFormatterSettings { OutputFormat = arguments.OutputFormat, LiquidTemplate = template, GroupBy = arguments.GroupBy };
7777
string formattedReleaseNotes = SemanticReleaseNotesFormatter.Format(releaseNotes, formatterSettings);
7878

7979
// Select output

0 commit comments

Comments
 (0)