feat(cli): let a build name its own version

A nightly printed the same 19.0.0 as the release it followed, so a bug
report could not say which one it came from. SOULSEEK_RS_VERSION at
compile time replaces the crate version in --version, the TUI and the
daemon status.
This commit is contained in:
Michel de Graaf
2026-09-21 12:15:43 +02:00
parent 0b97a45d8b
commit d71172542c
4 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -522,7 +522,7 @@ impl Daemon {
fn identify(&self) -> AuthResult {
AuthResult {
protocol: PROTOCOL_VERSION,
daemon_version: env!("CARGO_PKG_VERSION").to_string(),
daemon_version: crate::cli::VERSION.to_string(),
username: self.session.username(),
}
}
@@ -532,7 +532,7 @@ impl Daemon {
DaemonStatus {
username: self.session.username(),
server: self.server.clone(),
daemon_version: env!("CARGO_PKG_VERSION").to_string(),
daemon_version: crate::cli::VERSION.to_string(),
protocol: PROTOCOL_VERSION,
listen_port: self.session.listen_port(),
shared_folders: folders,