hoc/build.rs

13 lines
369 B
Rust
Raw Permalink 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");
2022-02-17 12:01:50 +01:00
Ructe::from_env()?.compile_templates("templates")
2019-04-23 18:19:54 +02:00
}