From 2e8b817d538ee0ebf910c3e86ace14fe22cde44f Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Thu, 5 Dec 2024 11:43:31 +0100 Subject: [PATCH] httpd: Copy `RADICLE_VERSION` to `/` Also deprecates it on `api/v1/` --- radicle-httpd/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radicle-httpd/src/lib.rs b/radicle-httpd/src/lib.rs index c1c1aa7d7..b05a072e0 100644 --- a/radicle-httpd/src/lib.rs +++ b/radicle-httpd/src/lib.rs @@ -30,6 +30,8 @@ use radicle::Profile; use tracing_extra::{tracing_middleware, ColoredStatus, Paint, RequestId, TracingInfo}; +use crate::api::RADICLE_VERSION; + mod api; mod axum_extra; mod cache; @@ -138,6 +140,7 @@ fn router(options: Options, profile: Profile) -> anyhow::Result { async fn root_index_handler() -> impl IntoResponse { let response = serde_json::json!({ "welcome": "Welcome to the radicle-httpd JSON API, this service doesn't serve the Radicle Explorer web client.", + "version": format!("{}-{}", RADICLE_VERSION, env!("GIT_HEAD")), "path": "/", "links": [ {