fix(daemon): version the contract by its protocol, not by the crate
info.version carried the crate version, so release-plz bumping Cargo.toml left docs/openrpc.json a version behind and failed document_is_current on every platform. With the CI gate in front of publishing, that made every release PR unmergeable. The protocol version is what auth negotiates and what the contract actually describes.
This commit is contained in:
+1
-1
@@ -1225,7 +1225,7 @@
|
||||
"name": "MIT"
|
||||
},
|
||||
"title": "soulseek-rs daemon",
|
||||
"version": "12.0.0"
|
||||
"version": "1"
|
||||
},
|
||||
"methods": [
|
||||
{
|
||||
|
||||
@@ -331,7 +331,10 @@ fn document() -> Value {
|
||||
"openrpc": "1.3.2",
|
||||
"info": {
|
||||
"title": "soulseek-rs daemon",
|
||||
"version": env!("CARGO_PKG_VERSION"),
|
||||
// The contract's own version, which is what a client negotiates in
|
||||
// `auth`. The crate version would put a release bump in this file
|
||||
// and fail `document_is_current` on every release PR.
|
||||
"version": crate::daemon::proto::PROTOCOL_VERSION.to_string(),
|
||||
"description": "Control a running soulseek-rs daemon. Newline-delimited \
|
||||
JSON-RPC 2.0 over a Unix socket (local, authenticated by socket permissions) or \
|
||||
TCP (remote, authenticated by the token in <state-dir>/daemon.token). `auth` must \
|
||||
|
||||
Reference in New Issue
Block a user