Skip to content

Commit 81a9c85

Browse files
committed
add release notes for the new props and data structures
1 parent 0efed34 commit 81a9c85

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ It might be helpful to see how this library can help you. Imagine you have a pr
3333
and a CHANGELOG.md file like this:
3434

3535
```md
36-
# Changelog
36+
# Changelog
3737

3838
## 1.0.0 - 2022-01-14
3939

@@ -71,18 +71,23 @@ If your changelog has multiple versions, the latest one will be used.
7171

7272
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.
7373

74+
| Property | Type | Default Value | Description |
75+
| 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 |
76+
|
77+
7478
## API
7579

7680
When the task runs, it writes several output items and properties:
7781

7882
|Name|Type|Description|
7983
|----|----|-----------|
80-
| UnreleasedChangelog | UnreleasedChangelogData option | If present, there was an 'Unreleased' section in the Changelog. This structure will contain the sections present. |
84+
| 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. |
85+
| 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! |
8186
| CurrentReleaseChangelog | ReleaseChangelogData option | If present, there was at least one released logged in the Changelog. This structure will contain the details of each one. |
8287
| 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! |
88+
| 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! |
8489

85-
### ChangelogData
90+
### ReleaseChangelogData
8691

8792
This TaskItem has metadata for each of the known sections of a Changelog:
8893

@@ -95,13 +100,6 @@ This TaskItem has metadata for each of the known sections of a Changelog:
95100

96101
In each case, the value of the metadata is the newline-concatenated list of all of the Changelog Entries for that section.
97102

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-
103+
In addition,
106104
* the `Identity` of the `TaskItem` is the Semantic Version of the release
107105
* the `Date` of the `TaskItem` is the `YYYY-MM-DD`-formatted date of the release

0 commit comments

Comments
 (0)