2022-10-09 23:26:37 +02:00
|
|
|
use clap::{builder::PossibleValuesParser, Arg, Command as ClapCommand};
|
2020-12-16 05:21:26 +01:00
|
|
|
|
|
|
|
use crate::util;
|
|
|
|
|
2021-01-24 23:08:48 +01:00
|
|
|
use super::apply;
|
|
|
|
pub use super::apply::run;
|
|
|
|
|
2022-10-09 23:26:37 +02:00
|
|
|
pub fn subcommand() -> ClapCommand {
|
2022-03-08 07:02:04 +01:00
|
|
|
let command = ClapCommand::new("build")
|
2022-01-03 19:37:03 +01:00
|
|
|
.about("Build configurations but not push to remote machines")
|
2022-07-30 07:13:09 +02:00
|
|
|
.long_about(
|
|
|
|
r#"Build configurations but not push to remote machines
|
2020-12-16 05:21:26 +01:00
|
|
|
|
2022-07-30 07:13:09 +02:00
|
|
|
This subcommand behaves as if you invoked `apply` with the `build` goal."#,
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
Arg::new("goal")
|
|
|
|
.hide(true)
|
|
|
|
.default_value("build")
|
2022-10-09 23:26:37 +02:00
|
|
|
.value_parser(PossibleValuesParser::new(["build"]))
|
|
|
|
.num_args(1),
|
2022-07-30 07:13:09 +02:00
|
|
|
);
|
2020-12-16 05:21:26 +01:00
|
|
|
|
2021-01-24 23:08:48 +01:00
|
|
|
let command = apply::register_deploy_args(command);
|
2020-12-16 05:21:26 +01:00
|
|
|
|
2021-01-24 23:08:48 +01:00
|
|
|
util::register_selector_args(command)
|
2020-12-16 05:21:26 +01:00
|
|
|
}
|