feat(server): change semantic versioning to dynamic build date (yyyy.mm.dd)

This commit is contained in:
Riz Ashraf committed 2026-09-12 09:29:46 +01:00
1 parent 1f050b60b6
commit 44800d4ef2
4 files changed
+115 -1

No files matched your search

+5
View File
@@ -1,6 +1,11 @@
use std::process::Command;
use chrono::Local;
fn main() {
let now = Local::now();
let build_date = now.format("%Y.%m.%d").to_string();
println!("cargo:rustc-env=BUILD_DATE={}", build_date);
if let Ok(output) = Command::new("git").args(&["rev-parse", "--short", "HEAD"]).output() {
if let Ok(hash) = String::from_utf8(output.stdout) {
println!("cargo:rustc-env=GIT_HASH={}", hash.trim());