diff --git a/crates/atuin-server/src/handlers/mod.rs b/crates/atuin-server/src/handlers/mod.rs index 50f82336..ce10f4b7 100644 --- a/crates/atuin-server/src/handlers/mod.rs +++ b/crates/atuin-server/src/handlers/mod.rs @@ -19,10 +19,16 @@ pub async fn index(state: State>) -> Json { pub tls: Tls, pub mail: Mail, + /// Advertise a version that is not what we are _actually_ running + /// Many clients compare their version with api.atuin.sh, and if they differ, notify the user + /// that an update is available. + /// Now that we take beta releases, we should be able to advertise a different version to avoid + /// notifying users when the server runs something that is not a stable release. + pub fake_version: Option, + #[serde(flatten)] pub db_settings: DbSettings, } diff --git a/crates/atuin/tests/common/mod.rs b/crates/atuin/tests/common/mod.rs index 84e3cea6..015098e9 100644 --- a/crates/atuin/tests/common/mod.rs +++ b/crates/atuin/tests/common/mod.rs @@ -39,6 +39,7 @@ pub async fn start_server(path: &str) -> (String, oneshot::Sender<()>, JoinHandl metrics: atuin_server::settings::Metrics::default(), tls: atuin_server::settings::Tls::default(), mail: atuin_server::settings::Mail::default(), + fake_version: None, }; let (shutdown_tx, shutdown_rx) = tokio::sync::oneshot::channel();