spacedrive/core/build.rs
Jamie Pine dbb3c56d30 feat: Add build timestamp to core status and CLI output
- Introduced a new `built_at` field in the `CoreStatus` struct to capture the build timestamp.
- Updated the `Cargo.toml` to include the `chrono` crate for handling date and time.
- Emitted the build timestamp during the build process in `build.rs`.
- Enhanced the CLI output to display the build timestamp alongside the core version and data directory.
2025-09-20 16:48:08 -07:00

17 lines
429 B
Rust

use vergen::EmitBuilder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Emit the instructions
EmitBuilder::builder()
.git_sha(true)
.git_commit_timestamp()
.git_branch()
.cargo_opt_level()
.cargo_target_triple()
.emit()?;
// Emit build timestamp manually
println!("cargo:rustc-env=BUILD_TIMESTAMP={}", chrono::Utc::now().to_rfc3339());
Ok(())
}