diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-02 21:48:02 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-02 21:48:02 +0300 |
| commit | b751d102f158968aab681cb663d27b4c32197f62 (patch) | |
| tree | 85d03609314559df7705c2cb0ab4e37ab6d9715f /src/server | |
| parent | 295b09ca25edbccac65401ee84fa420dd3888aad (diff) | |
feat: add preview update channel
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/autodetect.rs | 2 | ||||
| -rw-r--r-- | src/server/handoff.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/autodetect.rs b/src/server/autodetect.rs index c012aa03..a4ea721b 100644 --- a/src/server/autodetect.rs +++ b/src/server/autodetect.rs @@ -103,7 +103,7 @@ fn validate_running_server_compatibility() -> io::Result<()> { .protocol .map(|value| value.to_string()) .unwrap_or_else(|| "unknown".to_string()), - env!("CARGO_PKG_VERSION"), + crate::build_info::version(), crate::protocol::PROTOCOL_VERSION, crate::session::active_restart_after_update_guidance() ))) diff --git a/src/server/handoff.rs b/src/server/handoff.rs index 22d1f902..01f9e678 100644 --- a/src/server/handoff.rs +++ b/src/server/handoff.rs @@ -245,12 +245,12 @@ pub(crate) fn receive(socket_path: &Path, token: &str) -> io::Result<ReceivedHan if manifest .expected_version .as_deref() - .is_some_and(|version| version != env!("CARGO_PKG_VERSION")) + .is_some_and(|version| version != crate::build_info::version()) { return Err(io::Error::other(format!( "handoff expected herdr v{}, but this server is v{}", manifest.expected_version.as_deref().unwrap_or("unknown"), - env!("CARGO_PKG_VERSION") + crate::build_info::version() ))); } stream.write_all(b"validated\n")?; @@ -300,7 +300,7 @@ pub(crate) fn manifest_for( ) -> HandoffManifest { HandoffManifest { version: HANDOFF_VERSION, - source_version: env!("CARGO_PKG_VERSION").to_string(), + source_version: crate::build_info::version(), source_protocol: crate::protocol::PROTOCOL_VERSION, expected_version, expected_protocol, |
