diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-30 12:55:57 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-09-06 11:15:06 +0200 |
commit | 0bf1c985dcad30db4efcd9307df2b9ec23184ea5 (patch) | |
tree | 6a022100722f63e1b5c629065e717eb6f21b5458 /src/commands | |
parent | 910af91c2eb5d58b9fdf0317ba086c4ed687d690 (diff) |
Rewrite interface for finding artifacts with builder
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/find_artifact.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index 0fc9b8c..fbd8e10 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -102,7 +102,16 @@ pub async fn find_artifact(matches: &ArgMatches, config: &Configuration, progres .inspect(|pkg| trace!("Found package: {:?}", pkg)) .map(|pkg| { let script_filter = !matches.is_present("no_script_filter"); - let pathes = crate::db::find_artifacts(database.clone(), config, pkg, &release_stores, staging_store.as_ref(), &env_filter, script_filter)?; + let pathes = crate::db::FindArtifacts::builder() + .config(config) + .release_stores(&release_stores) + .staging_store(staging_store.as_ref()) + .database_connection(database.clone()) + .env_filter(&env_filter) + .script_filter(script_filter) + .package(pkg) + .build() + .run()?; pathes.iter() .map(|tpl| (tpl.0.joined(), tpl.1)) |