Skip to content

Commit b28132b

Browse files
authored
chore: use towncrier for CHANGELOG (#2149)
1 parent e7c877a commit b28132b

20 files changed

+86
-77
lines changed

CHANGELOG.md

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,7 @@
1-
# Change Log
2-
31
All notable changes to this project will be documented in this file.
42
This project adheres to [Semantic Versioning](https://semver.org/).
53

6-
## [Unreleased] - ReleaseDate
7-
8-
### Fixed
9-
- Fix `SigSet` incorrect implementation of `Eq`, `PartialEq` and `Hash`
10-
([#1946](https://github.com/nix-rust/nix/pull/1946))
11-
12-
- Fixed the function signature of `recvmmsg`, potentially causing UB
13-
([#2119](https://github.com/nix-rust/nix/issues/2119))
14-
### Added
15-
16-
- Added `impl From<Signal> for SigSet`.
17-
([#1959](https://github.com/nix-rust/nix/pull/1959))
18-
19-
- Added `impl std::ops::BitOr for SigSet`.
20-
([#1959](https://github.com/nix-rust/nix/pull/1959))
21-
22-
- Added `impl std::ops::BitOr for Signal`.
23-
([#1959](https://github.com/nix-rust/nix/pull/1959))
24-
25-
- Added `impl std::ops::BitOr<Signal> for SigSet`
26-
([#1959](https://github.com/nix-rust/nix/pull/1959))
27-
28-
- Fix `SignalFd::set_mask`. In 0.27.0 it would actually close the file
29-
descriptor.
30-
([#2141](https://github.com/nix-rust/nix/pull/2141))
31-
32-
- Added `Icmp` and `IcmpV6` to `SockProtocol`.
33-
(#[2103](https://github.com/nix-rust/nix/pull/2103))
34-
35-
- Added `F_GETPATH` FcntlFlags entry on Apple/NetBSD/DragonflyBSD for `::nix::fcntl`.
36-
([#2142](https://github.com/nix-rust/nix/pull/2142))
37-
38-
- Added `Ipv6HopLimit` to `::nix::sys::socket::ControlMessage` for Linux,
39-
MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku.
40-
([#2074](https://github.com/nix-rust/nix/pull/2074))
41-
42-
- Added `F_KINFO` FcntlFlags entry on FreeBSD for `::nix::fcntl`.
43-
([#2152](https://github.com/nix-rust/nix/pull/2152))
44-
45-
### Changed
46-
47-
- The MSRV is now 1.69
48-
([#2144](https://github.com/nix-rust/nix/pull/2144))
49-
50-
- The following APIs now take an implementation of `AsFd` rather than a
51-
`RawFd`:
52-
53-
- `unistd::tcgetpgrp`
54-
- `unistd::tcsetpgrp`
55-
- `unistd::fpathconf`
56-
- `unistd::ttyname`
57-
- `unistd::getpeereid`
58-
59-
([#2137](https://github.com/nix-rust/nix/pull/2137))
60-
61-
- Changed `openat()` and `Dir::openat()`, now take optional `dirfd`s
62-
([#2139](https://github.com/nix-rust/nix/pull/2139))
63-
64-
- `PollFd::new` now takes a `BorrowedFd` argument, with relaxed lifetime
65-
requirements relative to the previous version.
66-
([#2134](https://github.com/nix-rust/nix/pull/2134))
67-
68-
- `FdSet::{insert, remove, contains}` now take `BorrowedFd` arguments, and have
69-
relaxed lifetime requirements relative to 0.27.1.
70-
([#2136](https://github.com/nix-rust/nix/pull/2136))
71-
72-
- Simplified the function signatures of `recvmmsg` and `sendmmsg`
4+
# Change Log
735

746
## [0.27.1] - 2023-08-28
757

CONTRIBUTING.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,30 @@ pull' model described there.
6161
Please make pull requests against the `master` branch.
6262

6363
If you change the API by way of adding, removing or changing something or if
64-
you fix a bug, please add an appropriate note to the [change log][cl]. We
65-
follow the conventions of [Keep A CHANGELOG][kacl].
64+
you fix a bug, please add an appropriate note, every note should be a new markdown
65+
file under the [changelog directory][cl] stating the change made by your pull request,
66+
the filename should be in the following foramt:
6667

67-
[cl]: https://github.com/nix-rust/nix/blob/master/CHANGELOG.md
68-
[kacl]: https://github.com/olivierlacan/keep-a-changelog/tree/18adb5f5be7a898d046f6a4acb93e39dcf40c4ad
68+
```
69+
<PULL_REQUEST_ID>.<TYPE>.md
70+
```
71+
72+
These are 4 `TYPE`s available:
73+
74+
1. `added`
75+
2. `changed`
76+
3. `fixed`
77+
4. `removed`
78+
79+
Let's say you have added a new API to nix, then a change log like this should
80+
be added (assume it is PR #0)
81+
82+
```md
83+
# file: 0.added.md
84+
Added a new API xxx
85+
```
86+
87+
[cl]: https://github.com/nix-rust/nix/tree/master/changelog
6988
[pr-docs]: https://help.github.com/articles/using-pull-requests/
7089

7190
## Testing

RELEASE_PROCEDURE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ The release is prepared as follows:
1313

1414
- Ask for a new libc version if, necessary. It usually is. Then update the
1515
dependency in Cargo.toml accordingly.
16+
- Update the version number in `Cargo.toml`
17+
- Generate `CHANGELOG.md` for this release by
18+
`towncrier build --version=<VERSION> --yes`
1619
- Confirm that everything's ready for a release by running
1720
`cargo release <patch|minor|major>`
1821
- Create the release with `cargo release -x <patch|minor|major>`

changelog/.keep

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Do not remove this file. This is used to keep the `changelog` dir around after
2+
generating new changelog file.
3+
4+
Without this, `towncrier` would remove the changelog files as well as the
5+
directory if it is empty.

changelog/1946.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix `SigSet` incorrect implementation of `Eq`, `PartialEq` and `Hash`

changelog/1959.added.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Added `impl From<Signal> for SigSet`.
2+
- Added `impl std::ops::BitOr for SigSet`.
3+
- Added `impl std::ops::BitOr for Signal`.
4+
- Added `impl std::ops::BitOr<Signal> for SigSet`

changelog/2074.added.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added `Ipv6HopLimit` to `::nix::sys::socket::ControlMessage` for Linux,
2+
MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku.

changelog/2103.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `Icmp` and `IcmpV6` to `SockProtocol`

changelog/2119.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simplified the function signatures of `recvmmsg` and `sendmmsg`

changelog/2119.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed the function signature of `recvmmsg`, potentially causing UB

0 commit comments

Comments
 (0)