Skip to content

Commit

Permalink
chore: add new header to changelog of each crate
Browse files Browse the repository at this point in the history
Adds a new header with the correct version to each changelog, otherwise the new lint will fail on all of these crates. We also specify a `cargo release` "pre-release-hook" to automate this. All you need to do is run `cargo release hook` for the same crates that you are running `cargo release version` on.

Pull-Request: #4690.
  • Loading branch information
thomaseizinger authored Oct 20, 2023
1 parent 7e3c2fe commit 2a7291a
Show file tree
Hide file tree
Showing 37 changed files with 118 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ clippy.used_underscore_binding = "warn"
clippy.pedantic = "allow"
clippy.type_complexity = "allow"
clippy.unnecessary_wraps = "warn"

[workspace.metadata.release]
pre-release-hook = ["/bin/sh", '-c', '/bin/sh $WORKSPACE_ROOT/scripts/add-changelog-header.sh'] # Nested use of shell to expand variables.
3 changes: 3 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.1

- Implement `Debug` for `StreamMuxerEvent`.
Expand Down
3 changes: 3 additions & 0 deletions libp2p/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.53.0 - unreleased


## 0.52.4

- Introduce `libp2p::websocket_websys` module behind `websocket-websys` feature flag.
Expand Down
3 changes: 3 additions & 0 deletions misc/allow-block-list/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.0 - unreleased


## 0.2.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions misc/connection-limits/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.0 - unreleased


## 0.2.1

- Do not count a connection as established when it is denied by another sibling `NetworkBehaviour`.
Expand Down
3 changes: 3 additions & 0 deletions misc/memory-connection-limits/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.2.0 - unreleased


## 0.1.0

- Initial release.
3 changes: 3 additions & 0 deletions misc/metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.14.0 - unreleased


## 0.13.1

- Enable gossipsub related data-type fields when compiling for wasm.
Expand Down
3 changes: 3 additions & 0 deletions muxers/mplex/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions muxers/yamux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.45.0 - unreleased


## 0.44.1

- Update to `yamux` `v0.12` which brings performance improvements and introduces an ACK backlog of 256 inbound streams.
Expand Down
3 changes: 3 additions & 0 deletions protocols/autonat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.12.0 - unreleased


## 0.11.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions protocols/dcutr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.11.0 - unreleased


## 0.10.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions protocols/floodsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.44.0 - unreleased


## 0.43.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.46.0 - unreleased


## 0.45.2

- Deprecate `gossipsub::Config::idle_timeout` in favor of `SwarmBuilder::idle_connection_timeout`.
Expand Down
3 changes: 3 additions & 0 deletions protocols/identify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.44.0 - unreleased


## 0.43.1

- Handle partial push messages.
Expand Down
3 changes: 3 additions & 0 deletions protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.45.0 - unreleased


## 0.44.6

- Rename `Kademlia` symbols to follow naming convention.
Expand Down
3 changes: 3 additions & 0 deletions protocols/mdns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.45.0 - unreleased


## 0.44.0

- Change `mdns::Event` to hold `Vec` and remove `DiscoveredAddrsIter` and `ExpiredAddrsIter`.
Expand Down
3 changes: 3 additions & 0 deletions protocols/ping/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.44.0 - unreleased


## 0.43.1

- Honor ping interval in case of errors.
Expand Down
3 changes: 3 additions & 0 deletions protocols/relay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.17.0 - unreleased


## 0.16.2

<!-- Internal changes
Expand Down
3 changes: 3 additions & 0 deletions protocols/rendezvous/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.14.0 - unreleased


## 0.13.1
- Refresh registration upon a change in external addresses.
See [PR 4629].
Expand Down
3 changes: 3 additions & 0 deletions protocols/request-response/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.26.0 - unreleased


## 0.25.2

- Deprecate `request_response::Config::set_connection_keep_alive` in favor of `SwarmBuilder::idle_connection_timeout`.
Expand Down
3 changes: 3 additions & 0 deletions protocols/upnp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.2.0 - unreleased


## 0.1.1

- Fix high CPU usage due to repeated generation of failure events.
Expand Down
10 changes: 10 additions & 0 deletions scripts/add-changelog-header.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

header=$(head -n 1 "$CRATE_ROOT/CHANGELOG.md")
prefix="## $NEW_VERSION"

if [[ $header == $prefix* ]]; then
exit
fi

sed -i "1i ## ${NEW_VERSION} - unreleased\n\n" "$CRATE_ROOT/CHANGELOG.md"
3 changes: 3 additions & 0 deletions swarm-derive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.34.0 - unreleased


## 0.33.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions swarm-test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.0 - unreleased


## 0.2.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.44.0 - unreleased


## 0.43.6

- Deprecate `libp2p::swarm::SwarmBuilder`.
Expand Down
3 changes: 3 additions & 0 deletions transports/deflate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.1

- Deprecate in preparation for removal from the workspace.
Expand Down
3 changes: 3 additions & 0 deletions transports/dns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.1

- Remove `Dns` prefix from types like `TokioDnsConfig` and `DnsConfig` in favor of modules that describe the different variants.
Expand Down
3 changes: 3 additions & 0 deletions transports/noise/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.44.0 - unreleased


## 0.43.2

- Update x25519-dalek to 2.0.0.
Expand Down
3 changes: 3 additions & 0 deletions transports/plaintext/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.1

- Rename `Plaintext2Config` to `Config` to follow naming conventions across repository.
Expand Down
3 changes: 3 additions & 0 deletions transports/pnet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.24.0 - unreleased


## 0.23.1

<!-- Interal changes:
Expand Down
3 changes: 3 additions & 0 deletions transports/quic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.10.0 - unreleased


## 0.9.3

- No longer report error when explicit closing of a QUIC endpoint succeeds.
Expand Down
3 changes: 3 additions & 0 deletions transports/tcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.41.0 - unreleased


## 0.40.1

- Expose `async_io::TcpStream`.
Expand Down
3 changes: 3 additions & 0 deletions transports/tls/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.0 - unreleased


## 0.2.1

- Switch from webpki to rustls-webpki.
Expand Down
3 changes: 3 additions & 0 deletions transports/uds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.40.0 - unreleased


## 0.39.0

- Raise MSRV to 1.65.
Expand Down
3 changes: 3 additions & 0 deletions transports/websocket-websys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.0 - unreleased


## 0.2.0

- Add Websys Websocket transport.
Expand Down
3 changes: 3 additions & 0 deletions transports/websocket/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.43.0 - unreleased


## 0.42.1

- Bump `futures-rustls` to `0.24.0`.
Expand Down
3 changes: 3 additions & 0 deletions transports/webtransport-websys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.2.0 - unreleased


## 0.1.0

* Initial implementation of WebTranport transport using web-sys bindings. See [PR 4015].
Expand Down

0 comments on commit 2a7291a

Please sign in to comment.