breakout tmpl from configgen; stage variations/platform feat

This commit is contained in:
2026-02-17 03:00:17 -07:00
parent bd91fe5b15
commit a813c4cb53
13 changed files with 102 additions and 30 deletions

View File

@@ -1,13 +1,14 @@
mod cli;
mod log;
mod specs;
mod tmpls;
mod render;
mod spec;
mod tmpl;
use log::LogLevel;
use render::RenderedConfig;
use std::fs::{self, File, OpenOptions, create_dir_all, write};
use std::io::Write;
use std::path::Path;
use tmpls::RenderedConfig;
use yaml_serde;
fn main() {
@@ -16,11 +17,14 @@ fn main() {
dbug!(dbg, "{:#?}", &args);
let specifications: Vec<specs::Specification> =
specs::compile(&args.devices, &args.env.spec_path, dbg);
let specifications: Vec<spec::Specification> =
spec::compile(&args.devices, &args.env.spec_path, dbg);
for spec in specifications {
let result = RenderedConfig::from_spec(&spec, dbg).ok().unwrap();
let result = RenderedConfig::from_spec(&spec, dbg).unwrap_or_else(|e| {
eprintln!("{}", e);
std::process::exit(1);
});
output_rendered_configs(result, &args.env.out_path, dbg)
}
}