mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
- 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.
17 lines
429 B
Rust
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(())
|
|
}
|