Print the version on lift off

This commit is contained in:
Paul van Tilburg 2023-01-16 21:18:20 +01:00
parent ca116351db
commit 5cbc3a04fc
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 8 additions and 0 deletions

View File

@ -107,4 +107,12 @@ pub fn setup() -> Rocket<Build> {
let _ = rocket::tokio::spawn(update_loop(service));
})
}))
.attach(AdHoc::on_liftoff("Version", |_| {
Box::pin(async move {
let name = env!("CARGO_PKG_NAME");
let version = env!("CARGO_PKG_VERSION");
println!("☀️ Started {name} v{version}");
})
}))
}