You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ It might be helpful to see how this library can help you. Imagine you have a pr
33
33
and a CHANGELOG.md file like this:
34
34
35
35
```md
36
-
# Changelog
36
+
# Changelog
37
37
38
38
## 1.0.0 - 2022-01-14
39
39
@@ -71,18 +71,25 @@ If your changelog has multiple versions, the latest one will be used.
71
71
72
72
There's really only one property that matters for these targets, and that's `ChangelogFile`. This needs to point to the Changelog file you want to read, but it defaults to `CHANGELOG.md` in the root of a given project in case you want to adhere to defaults.
73
73
74
+
| Property | Type | Default Value | Description |
75
+
| - | - | - | - |
76
+
| ChangelogFile | string | CHANGELOG.md | Points to the changelog file to parse. Note that the default value is set to the _project_ root by default, so a repository-wide changelog would require this property be set to a different value, for example in a Directory.Build.props file |
77
+
| GenerateAssemblyBuildDateAttribute | boolean | true | If set, an assembly metadata attribute named "BuildDate" will be generated with the date (YYYY-MM-DD) of the parsed release. |
78
+
| GenerateVersionForUnreleasedChanges | boolean | true | If set, the assembly/package version and release notes will be set from Unreleased changes, if any are present. |
79
+
74
80
## API
75
81
76
82
When the task runs, it writes several output items and properties:
77
83
78
84
|Name|Type|Description|
79
85
|----|----|-----------|
80
-
| UnreleasedChangelog | UnreleasedChangelogData option | If present, there was an 'Unreleased' section in the Changelog. This structure will contain the sections present. |
86
+
| UnreleasedChangelog | ReleaseChangelogData option | If present, there was an 'Unreleased' section in the Changelog. This structure will contain the sections present, as well as an auto-incremented version number for this release. |
87
+
| UnreleasedReleaseNotes | string option | If present, contains the concatenated list of all Changelog sections for the Unreleased section of the Changelog. This is a convenience property so that you don't have to String.Join all the lines in the `ReleaseChangelogData` structure yourself! |
81
88
| CurrentReleaseChangelog | ReleaseChangelogData option | If present, there was at least one released logged in the Changelog. This structure will contain the details of each one. |
82
89
| AllReleasedChangelogs | ReleaseChangelogData list | Contains the ordered list of all released in the ChangelogFile, descending. |
83
-
| LatestReleaseNotes | string option | If present, contains the concatenated list of all Changelog sections for the latest release. This is a convenience property so that you don't have to String.Join all the lines in the `ReleaseChangelogData` yourself! |
90
+
| LatestReleaseNotes | string option | If present, contains the concatenated list of all Changelog sections for the latest release. This is a convenience property so that you don't have to String.Join all the lines in the `ReleaseChangelogData`structure yourself! |
84
91
85
-
### ChangelogData
92
+
### ReleaseChangelogData
86
93
87
94
This TaskItem has metadata for each of the known sections of a Changelog:
88
95
@@ -95,13 +102,6 @@ This TaskItem has metadata for each of the known sections of a Changelog:
95
102
96
103
In each case, the value of the metadata is the newline-concatenated list of all of the Changelog Entries for that section.
97
104
98
-
### UnreleasedChangelogData
99
-
100
-
This structure is a `ChangelogData` with an `Identity` of `"Unreleased"`.
101
-
102
-
### ReleaseChangelogData
103
-
104
-
This structure is the same as `ChangelogData`, but it contains two more items of metadata:
105
-
105
+
In addition,
106
106
* the `Identity` of the `TaskItem` is the Semantic Version of the release
107
107
* the `Date` of the `TaskItem` is the `YYYY-MM-DD`-formatted date of the release
SemanticVersion.Parse "0.3.1", DateTime(2022,1,8), Some { ChangelogData.Default with Added =["- Add XmlDocs to the generated package"]}
93
+
letsample1ReleaseExpected=
94
+
SemanticVersion.Parse "0.3.1",
95
+
DateTime(2022,1,8),
96
+
Some { ChangelogData.Default with Added =["- Add XmlDocs to the generated package"]}
94
97
95
-
letsample="""# Changelog
98
+
letsample=
99
+
"""# Changelog
96
100
All notable changes to this project will be documented in this file.
97
101
98
102
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -124,15 +128,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
124
128
* Initial implementation
125
129
"""
126
130
127
-
letsampleExpected:Changelogs ={
128
-
Unreleased = None
129
-
Releases =[
130
-
SemanticVersion.Parse "0.3.1", DateTime(2022,1,8), Some { ChangelogData.Default with Added =["* Add XmlDocs to the generated package"]}
131
-
SemanticVersion.Parse "0.3.0", DateTime(2021,11,23), Some { ChangelogData.Default with Added =["* Expose client `CodeAction` caps as CodeActionClientCapabilities. (by @razzmatazz)";"* Map CodeAction.IsPreferred & CodeAction.Disabled props. (by @razzmatazz)"]}
132
-
SemanticVersion.Parse "0.2.0", DateTime(2021,11,17), Some { ChangelogData.Default with Added =["* Add support for `codeAction/resolve` (by @razzmatazz)"]}
133
-
SemanticVersion.Parse "0.1.1", DateTime(2021,11,15), Some { ChangelogData.Default with Added =["* Initial implementation"]}
134
-
]
135
-
}
131
+
letsampleExpected:Changelogs =
132
+
{ Unreleased = None
133
+
Releases =
134
+
[ SemanticVersion.Parse "0.3.1",
135
+
DateTime(2022,1,8),
136
+
Some { ChangelogData.Default with Added =["* Add XmlDocs to the generated package"]}
137
+
SemanticVersion.Parse "0.3.0",
138
+
DateTime(2021,11,23),
139
+
Some
140
+
{ ChangelogData.Default with
141
+
Added =
142
+
["* Expose client `CodeAction` caps as CodeActionClientCapabilities. (by @razzmatazz)"
0 commit comments