hoc/build.rs

16 lines
470 B
Rust
Raw Normal View History

2019-04-23 18:19:54 +02:00
extern crate ructe;
extern crate vergen;
2022-02-17 12:01:50 +01:00
use ructe::{Ructe, RucteError};
2021-03-29 12:38:29 +02:00
use vergen::{vergen, Config, ShaKind};
2019-04-23 18:19:54 +02:00
2022-02-17 12:01:50 +01:00
fn main() -> Result<(), RucteError> {
2021-03-29 12:38:29 +02:00
let mut config = Config::default();
*config.git_mut().sha_kind_mut() = ShaKind::Short;
vergen(config).expect("Unable to generate static repo info");
let mut ructe = Ructe::from_env()?;
let mut statics = ructe.statics()?;
statics.add_files("static")?;
ructe.compile_templates("templates")
2019-04-23 18:19:54 +02:00
}