colmena/src/command/build.rs
Zhaofeng Li 872949504b Migrate to Clap 4.0
It was kind of a bumpy experience. Gradual migration to the Derive API
is coming soon.
2022-10-09 15:26:37 -06:00

27 lines
787 B
Rust

use clap::{builder::PossibleValuesParser, Arg, Command as ClapCommand};
use crate::util;
use super::apply;
pub use super::apply::run;
pub fn subcommand() -> ClapCommand {
let command = ClapCommand::new("build")
.about("Build configurations but not push to remote machines")
.long_about(
r#"Build configurations but not push to remote machines
This subcommand behaves as if you invoked `apply` with the `build` goal."#,
)
.arg(
Arg::new("goal")
.hide(true)
.default_value("build")
.value_parser(PossibleValuesParser::new(["build"]))
.num_args(1),
);
let command = apply::register_deploy_args(command);
util::register_selector_args(command)
}