Add build date to logs
parent
58cfb4e9d9
commit
2f69f1d3ab
|
@ -29,6 +29,9 @@ required-features = [
|
|||
[[bin]]
|
||||
name = "site"
|
||||
|
||||
[build-dependencies]
|
||||
time = { version = "0.3", features = ["formatting"] }
|
||||
|
||||
[dependencies]
|
||||
async-trait = { version = "0.1" }
|
||||
enum-iterator = { version = "1.4" }
|
||||
|
|
9
build.rs
9
build.rs
|
@ -1,3 +1,12 @@
|
|||
use time::{format_description::well_known::Rfc2822, OffsetDateTime};
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=content");
|
||||
|
||||
println!(
|
||||
"cargo:rustc-env=BUILD_TIME={}",
|
||||
OffsetDateTime::now_utc()
|
||||
.format(&Rfc2822)
|
||||
.expect("time format")
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ fn main() {
|
|||
}
|
||||
);
|
||||
|
||||
log::info!("Compiled {}", env!("BUILD_TIME"));
|
||||
|
||||
let app = yew::Renderer::<App>::new();
|
||||
|
||||
#[cfg(feature = "hydration")]
|
||||
|
|
Loading…
Reference in New Issue