git.delta.rocks / jrsonnet / refs/commits / a24f5304c031

difftreelog

feat(build-systems) --skip option

Yaroslav Bolyukin2020-12-04parent: #fc5bb23.patch.diff
in: trunk

1 file changed

modifiedsrc/cmds/build_systems.rsdiffbeforeafterboth
10use log::{info, warn};10use log::{info, warn};
1111
12#[derive(Clap)]12#[derive(Clap)]
13#[clap(group = clap::ArgGroup::new("target"))]
13pub struct BuildSystems {14pub struct BuildSystems {
14 /// Hosts to skip15 /// Hosts to skip
15 #[clap(long, number_of_values = 1)]16 #[clap(long, number_of_values = 1, group = "target")]
16 skip: Vec<String>,17 skip: Vec<String>,
18 /// Hosts to build
19 #[clap(long, number_of_values = 1, group = "target")]
20 only: Vec<String>,
17 /// Host, which should be threaten as localhost21 /// Host, which should be threaten as localhost
18 #[clap(long, env = "FLEET_LOCALHOST")]22 #[clap(long, env = "FLEET_LOCALHOST")]
19 localhost: Option<String>,23 localhost: Option<String>,
59 let data = SecretDb::open(&db)?.generate_nix_data()?;63 let data = SecretDb::open(&db)?.generate_nix_data()?;
6064
61 for host in hosts.iter() {65 for host in hosts.iter() {
62 if self.skip.contains(host) {66 if self.only.len() > 0 && !self.only.contains(host) || self.skip.contains(host) {
63 warn!("Skipping host {}", host);67 warn!("Skipping host {}", host);
64 continue;68 continue;
65 }69 }