Skip to content

Commit 37b8107

Browse files
committed
chore(release): prepare for v0.2
This also adds `CHANGELOG.md` and a git-cliff config for generating the changelog easily.
1 parent 3d46c94 commit 37b8107

3 files changed

Lines changed: 133 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## [0.2.0] - 2026-05-14
2+
3+
### Features
4+
5+
- [**breaking**] Validate node and property names ([#35](https://github.com/google/dtoolkit/pull/35))
6+
7+
### Refactor
8+
9+
- Use newer file naming convention instead of `mod.rs` ([#27](https://github.com/google/dtoolkit/pull/27))
10+
- [**breaking**] Implement generic `From<T>` for `DeviceTreeNode` ([#28](https://github.com/google/dtoolkit/pull/28))
11+
12+
### Miscellaneous
13+
14+
- Remove unused `FdtProperty::value_offset` field ([#30](https://github.com/google/dtoolkit/pull/30))
15+
16+
## [0.1.1] - 2026-01-12
17+
18+
### Miscellaneous
19+
20+
- Add docs.rs metadata to Cargo.toml and use `doc_cfg` ([#26](https://github.com/google/dtoolkit/pull/26))
21+
22+
## [0.1.0] - 2026-01-09
23+
24+
### Features
25+
26+
- First version published on crates.io

CONTRIBUTING.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,20 @@ information on using pull requests.
4141
(beyond performance optimization) it must be accompanied by
4242
an `#[expect(unsafe_code)]` attribute, stating the rationale.
4343
* All `unsafe` code must be tested. The CI suite includes Miri to detect any
44-
undefined behavior.
44+
undefined behavior.
45+
46+
## Releasing a new version
47+
48+
This project uses [git-cliff](https://git-cliff.org/) to generate changelogs.
49+
When releasing a new version, run:
50+
51+
```
52+
git-cliff --unreleased --tag <version>
53+
```
54+
55+
(where `<version>` is the version number to be released)
56+
57+
Append the output to the `CHANGELOG.md` file and make changes if necessary.
58+
59+
Note that in order for this to work properly, the commit messages must follow
60+
[Conventional Commits](https://git-cliff.org/docs/#how-should-i-write-my-commits).

cliff.toml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# git-cliff ~ configuration file
2+
# https://git-cliff.org/docs/configuration
3+
4+
5+
[changelog]
6+
# See https://keats.github.io/tera/docs/#introduction
7+
body = """
8+
{% if version %}\
9+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
10+
{% else %}\
11+
## [unreleased]
12+
{% endif %}\
13+
{% for group, commits in commits | group_by(attribute="group") %}
14+
### {{ group | striptags | trim | upper_first }}
15+
{% for commit in commits %}
16+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
17+
{% if commit.breaking %}[**breaking**] {% endif %}\
18+
{{ commit.message | upper_first }}\
19+
{% endfor %}
20+
{% endfor %}
21+
"""
22+
# Remove leading and trailing whitespaces from the changelog's body.
23+
trim = true
24+
# Render body even when there are no releases to process.
25+
render_always = true
26+
# An array of regex based postprocessors to modify the changelog.
27+
postprocessors = [
28+
# Replace the placeholder <REPO> with a URL.
29+
#{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" },
30+
]
31+
# render body even when there are no releases to process
32+
# render_always = true
33+
# output file path
34+
# output = "test.md"
35+
36+
[git]
37+
# Parse commits according to the conventional commits specification.
38+
# See https://www.conventionalcommits.org
39+
conventional_commits = true
40+
# Exclude commits that do not match the conventional commits specification.
41+
filter_unconventional = true
42+
# Require all commits to be conventional.
43+
# Takes precedence over filter_unconventional.
44+
require_conventional = false
45+
# Split commits on newlines, treating each line as an individual commit.
46+
split_commits = false
47+
# An array of regex based parsers to modify commit messages prior to further processing.
48+
commit_preprocessors = [
49+
# Replace the issue/PR number with the link. It will work for issues as well as GitHub has a redirect.
50+
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/google/dtoolkit/pull/${1}))" },
51+
]
52+
# Prevent commits that are breaking from being excluded by commit parsers.
53+
protect_breaking_commits = 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 = "^feat", group = "<!-- 0 -->Features" },
59+
{ message = "^fix", group = "<!-- 1 -->Bug Fixes" },
60+
{ message = "^doc", group = "<!-- 3 -->Documentation" },
61+
{ message = "^perf", group = "<!-- 4 -->Performance" },
62+
{ message = "^refactor", group = "<!-- 2 -->Refactor" },
63+
{ message = "^style", group = "<!-- 5 -->Styling" },
64+
{ message = "^test", group = "<!-- 6 -->Testing" },
65+
{ message = "^chore\\(release\\): prepare for", skip = true },
66+
{ message = "^chore\\(deps.*\\)", skip = true },
67+
{ message = "^chore\\(pr\\)", skip = true },
68+
{ message = "^chore\\(pull\\)", skip = true },
69+
{ message = "^chore|^ci", group = "<!-- 7 -->Miscellaneous" },
70+
{ body = ".*security", group = "<!-- 8 -->Security" },
71+
{ message = "^revert", group = "<!-- 9 -->Revert" },
72+
{ message = ".*", group = "<!-- 10 -->Other" },
73+
]
74+
# Exclude commits that are not matched by any commit parser.
75+
filter_commits = false
76+
# Fail on a commit that is not matched by any commit parser.
77+
fail_on_unmatched_commit = false
78+
# An array of link parsers for extracting external references, and turning them into URLs, using regex.
79+
link_parsers = []
80+
# Include only the tags that belong to the current branch.
81+
use_branch_tags = false
82+
# Order releases topologically instead of chronologically.
83+
topo_order = false
84+
# Order commits topologically instead of chronologically.
85+
topo_order_commits = true
86+
# Order of commits in each group/release within the changelog.
87+
# Allowed values: newest, oldest
88+
sort_commits = "oldest"
89+
# Process submodules commits
90+
recurse_submodules = false

0 commit comments

Comments
 (0)