Skip to content

Commit c5d87ac

Browse files
committed
Use git-cliff to generate CHANGELOG (with some manual editions)
Use git-cliff for automatic generation of the Changelog, in the 'Keep a Changelog' format. However, we do not use it in fully automatic mode: previous changes are not all in the correct format and this would loose some content (but do we care?). This may be considered again in the future to switch to fully automatic.
1 parent 37722ab commit c5d87ac

File tree

2 files changed

+129
-3
lines changed

2 files changed

+129
-3
lines changed

CHANGELOG.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,52 @@
1-
# Change Log
1+
<!-- generated by `git cliff -u -p CHANGELOG.md` and edited to set version -->
2+
# Changelog
23

3-
## [Unreleased][unreleased]
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.17.0]
48

59
### Added
610

7-
### Changed/Fixed
11+
- Add benchmarks (using criterion)
12+
- Add example to display information about pcap file
13+
- Add method to get shb_hardware option value from SHB
14+
- Add helpers for SHB options
15+
- Add helper to get IPv4Addr and IPv6Addr from IDB
16+
- Add helpers to get the most common options for IDB
17+
- Add documentation for PcapNGOption structure and fields
18+
- Add unit test for timestamp decoding
19+
- Add helpers to get the most common options for ISB
20+
- Add Send trait bound to create_reader so I can use this in async context
21+
22+
### Changed
23+
24+
- Change `as_xxx()` function to return an error if length or value is invalid
25+
- Start adding helper functions for IDB and factorize code
26+
- Adjust lifetime in trait definition
27+
- Bump rustsec/audit-check from 1 to 2
28+
- Disable protobuf output in benchmarks (Closes #49)
29+
- Upgrade nom to version 8.0
30+
- Update MSRV to 1.65 (for nom 8)
31+
- Upgrade pprof to 0.15 (Closes #46)
32+
- Bump the crates-io group across 1 directory with 2 updates
33+
- Keep criterion dev-dependency to 0.5, pprof is not yet compatible with 0.6
34+
35+
### Fixed
36+
37+
- Fix PcapNGOption 32 bits conversions
38+
- Fix typo
39+
- Fix Correct header detection in LegacyPcapReader
40+
41+
### Other
42+
43+
- Fix clippy warnings: elided lifetime has a name
44+
- Fix (nightly) clippy warnings: explicit lifetime could be elided
45+
- Generate lockfile (to see if that fixes rustsec/audit-check v2 failures)
46+
- Fix clippy warnings: inline arguments in `println!`/`format!`
47+
- Fix clippy (nightly) warning: error: hiding a lifetime that's elided elsewhere is confusing
48+
- Update cargo-check-external-types toolchain
49+
- Ignore errors in check-external-types for now
850

951
## 0.16.0
1052

cliff.toml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# git-cliff ~ configuration file
2+
# https://git-cliff.org/docs/configuration
3+
4+
[changelog]
5+
# A Tera template to be rendered as the changelog's header.
6+
# See https://keats.github.io/tera/docs/#introduction
7+
header = """
8+
<!-- generated by `git cliff -u -p CHANGELOG.md` and edited to set version -->
9+
# Changelog\n
10+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
11+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
12+
"""
13+
# A Tera template to be rendered for each release in the changelog.
14+
# See https://keats.github.io/tera/docs/#introduction
15+
body = """
16+
{% if version -%}
17+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
18+
{% else -%}
19+
## [Unreleased]
20+
{% endif -%}
21+
{% for group, commits in commits | group_by(attribute="group") %}
22+
### {{ group | upper_first }}
23+
{% for commit in commits %}
24+
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
25+
{% endfor %}
26+
{% endfor %}\n
27+
"""
28+
# A Tera template to be rendered as the changelog's footer.
29+
# See https://keats.github.io/tera/docs/#introduction
30+
footer = """
31+
{% for release in releases -%}
32+
{% if release.version -%}
33+
{% if release.previous.version -%}
34+
[{{ release.version | trim_start_matches(pat="v") }}]: \
35+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
36+
/compare/{{ release.previous.version }}..{{ release.version }}
37+
{% endif -%}
38+
{% else -%}
39+
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
40+
/compare/{{ release.previous.version }}..HEAD
41+
{% endif -%}
42+
{% endfor %}
43+
<!-- generated by git-cliff -->
44+
"""
45+
# Remove leading and trailing whitespaces from the changelog's body.
46+
trim = true
47+
48+
[git]
49+
# Parse commits according to the conventional commits specification.
50+
# See https://www.conventionalcommits.org
51+
conventional_commits = true
52+
# Exclude commits that do not match the conventional commits specification.
53+
filter_unconventional = false
54+
# An array of regex based parsers for extracting data from the commit message.
55+
# Assigns commits to groups.
56+
# Optionally sets the commit's scope and can decide to exclude commits from further processing.
57+
commit_parsers = [
58+
{ message = "^[a|A]dd", group = "Added" },
59+
{ message = "^[s|S]upport", group = "Added" },
60+
{ message = "^[r|R]emove", group = "Removed" },
61+
{ message = "^[Cc][Ii]:", group = "Other" },
62+
{ message = "clippy", group = "Other" },
63+
{ message = "^.*: add", group = "Added" },
64+
{ message = "^.*: support", group = "Added" },
65+
{ message = "^.*: remove", group = "Removed" },
66+
{ message = "^.*: delete", group = "Removed" },
67+
{ message = "^test", group = "Fixed" },
68+
{ message = "^[f|F]ix", group = "Fixed" },
69+
{ message = "^.*: fix", group = "Fixed" },
70+
{ message = "^.*", group = "Changed" },
71+
]
72+
# Prevent commits that are breaking from being excluded by commit parsers.
73+
filter_commits = false
74+
# glob pattern for matching git tags
75+
tag_pattern = "pcap-parser-[0-9]*"
76+
# regex for skipping tags
77+
skip_tags = ".*-rc|.*-alpha|.*-beta"
78+
# regex for ignoring tags
79+
ignore_tags = ""
80+
# Order releases topologically instead of chronologically.
81+
topo_order = false
82+
# Order of commits in each group/release within the changelog.
83+
# Allowed values: newest, oldest
84+
sort_commits = "oldest"

0 commit comments

Comments
 (0)