evoke/main.rs
1//! Format, lint, build, and deploy workspace binaries and Nvim libs.
2//!
3//! # Errors
4//! - Cargo commands or file copy operations fail.
5#![feature(exit_status_error)]
6
7use ytil_sys::cli::Args;
8
9mod cargo_metadata;
10mod ci;
11mod local;
12
13/// Format, lint, build, and deploy workspace binaries and Nvim libs.
14#[ytil_sys::main]
15fn main() -> rootcause::Result<()> {
16 let mut args = ytil_sys::cli::get();
17
18 if args.has_help() {
19 println!("{}", include_str!("../help.txt"));
20 return Ok(());
21 }
22
23 if let Some(command) = ci::cmd_from_args(&args)? {
24 return command.run(&ytil_sys::dir::get_workspace_root()?);
25 }
26
27 local::run(&mut args)
28}