From 27f6085f0cc2f882656d40e2b4665e20a4a80959 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 25 Jun 2021 19:11:30 +0200 Subject: 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 --- src/cli.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/cli.rs') 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") -- cgit v1.2.3