depot/third_party/nixpkgs/pkgs/applications/office/activitywatch/override-version.patch
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

17 lines
803 B
Diff

diff --git a/aw-server/src/endpoints/mod.rs b/aw-server/src/endpoints/mod.rs
index a080d2a..0411d1e 100644
--- a/aw-server/src/endpoints/mod.rs
+++ b/aw-server/src/endpoints/mod.rs
@@ -76,11 +76,10 @@ async fn root_favicon(state: &State<ServerState>) -> Option<NamedFile> {
fn server_info(config: &State<AWConfig>, state: &State<ServerState>) -> Json<Info> {
#[allow(clippy::or_fun_call)]
let hostname = gethostname().into_string().unwrap_or("unknown".to_string());
- const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");
Json(Info {
hostname,
- version: format!("v{} (rust)", VERSION.unwrap_or("(unknown)")),
+ version: String::from("@version@ (rust)"),
testing: config.testing,
device_id: state.device_id.clone(),
})