Update to vergen 8
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl
2023-04-13 11:55:52 +02:00
parent e57294ff4c
commit 914ee4b637
5 changed files with 1124 additions and 483 deletions

14
src/build.rs Normal file
View File

@@ -0,0 +1,14 @@
use anyhow::Result;
use ructe::Ructe;
use vergen::EmitBuilder;
fn main() -> Result<()> {
EmitBuilder::builder()
.git_sha(true)
.emit()?;
let mut ructe = Ructe::from_env()?;
let mut statics = ructe.statics()?;
statics.add_files("static")?;
Ok(ructe.compile_templates("templates")?)
}

View File

@@ -4,7 +4,7 @@ pub struct VersionInfo<'a> {
}
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
commit: env!("VERGEN_GIT_SHA_SHORT"),
commit: env!("VERGEN_GIT_SHA"),
version: env!("CARGO_PKG_VERSION"),
};