summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-06-25 19:11:30 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-09-16 12:32:18 +0200
commit27f6085f0cc2f882656d40e2b4665e20a4a80959 (patch)
tree9dd7b122cc3a0960f47c276608f29f33a4ae2c04 /src/cli.rs
parent3cc328a5f5857b95299d0ef998be5dcc3ddde6a7 (diff)
Add CLI parameters for tree-of subcommand to add condition-checking data
This patch adds parameters for the tree-of subcommand which can be used to change the package-DAG-building based on conditional requirements. If a package has a dependency-condition that only includes a dependency if there is a certain image used to build, the "image" parameter can be used to inspect the package tree (DAG) build with that image in mind. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index dbafd91..bc14341 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1061,6 +1061,35 @@ pub fn cli<'a>() -> App<'a> {
.value_name("VERSION_CONSTRAINT")
.about("A version constraint to search for (optional), E.G. '=1.0.0'")
)
+ .arg(Arg::new("image")
+ .required(false)
+ .multiple(false)
+ .takes_value(true)
+ .value_name("IMAGE NAME")
+ .short('I')
+ .long("image")
+ .about("Name of the docker image to use")
+ .long_about(indoc::indoc!(r#"
+ Name of the docker image to use.
+
+ Required because tree might look different on different images because of
+ conditions on dependencies.
+ "#))
+ )
+ .arg(Arg::new("env")
+ .required(false)
+ .multiple(true)
+ .short('E')
+ .long("env")
+ .validator(env_pass_validator)
+ .about("Additional env to be passed when building packages")
+ .long_about(indoc::indoc!(r#"
+ Additional env to be passed when building packages.
+
+ Required because tree might look different on different images because of
+ conditions on dependencies.
+ "#))
+ )
)
.subcommand(App::new("metrics")