25 lines
625 B
Rust

extern crate prost_build;
use prost_build::compile_protos;
use std::path::Path;
fn update_repo(path: &Path) -> Result<(), git2::Error> {
let repo = Repository::open(path)?;
let mut remote = repo.find_remote("origin")?;
let refspecs: [&str; 0] = [];
remote.fetch(&refspecs, None, None)
}
fn main() {
let path = Path::new("protobufs");
let protos = &["protobufs/meshtastic/mesh.proto"];
let includes = &["protobufs"];
if let Err(e) = compile_protos(protos, includes) {
eprintln!("Error could not compile protobufs");
eprintln!("{e}");
std::process::exit(1);
}
}