Add git commit hash to version info on HTTP servers

This commit is contained in:
NG (Graham) committed 2025-05-30 23:11:51 -04:00
1 parent 50cc0cc3a9
commit 093bc42e97
8 files changed
+33 -3

No files matched your search

+1
View File
@@ -26,3 +26,4 @@ jsonwebtoken = "9"
clap.workspace = true
rc_core = { version = "*", optional = true, path = "../rc_core" }
serde.workspace = true
git-version.workspace = true
+2 -1
View File
@@ -10,10 +10,11 @@ mod robocraft;
fn index() -> String {
let name = env!("CARGO_PKG_NAME");
let version = env!("CARGO_PKG_VERSION");
let git_version = git_version::git_version!(args = ["--always", "--dirty=+"]);
let authors = env!("CARGO_PKG_AUTHORS");
let license = env!("CARGO_PKG_LICENSE");
let repo = env!("CARGO_PKG_REPOSITORY");
format!("{} {} by [{}]\n{}\n{}", name, version, authors, license, repo)
format!("{} {}:{} by [{}]\n{}\n{}", name, version, git_version, authors, license, repo)
}
#[rocket::launch]