From 0bf1c985dcad30db4efcd9307df2b9ec23184ea5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 30 Aug 2021 12:55:57 +0200 Subject: Rewrite interface for finding artifacts with builder Signed-off-by: Matthias Beyer --- src/commands/find_artifact.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/commands') 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)) -- cgit v1.2.3