feat(backend, lb) add missing components

This commit is contained in:
lumither committed 2025-02-17 15:28:33 -08:00
1 parent acd0525513
commit eef32ad695
4 files changed
+39

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
use chrono::Utc;
use git2::Repository;
fn main() {
let repo = Repository::open("../..").expect("failed to open repository");
let commit = repo
.head()
.expect("failed to get HEAD")
.peel_to_commit()
.expect("failed to get HEAD commit");
let hash = commit.id().to_string();
let utc_date = Utc::now().date_naive().format("%Y%m%d").to_string();
let build_id = format!("{}@{}", utc_date, &hash[..8]);
println!("cargo:rustc-env=BUILD_ID={}", build_id);
}