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 @@
[package]
name = "server"
version = "0.1.0"
edition = "2021"
[dependencies]
macros = { path = "../macros" }
tracing = "0.1.41"
git2 = "0.20.0"
[build-dependencies]
git2 = "0.20.0"
chrono = "0.4.39"
+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);
}
+6
View File
@@ -0,0 +1,6 @@
[package]
name = "loadbalancer"
version = "0.1.0"
edition = "2021"
[dependencies]
+3
View File
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}