summaryrefslogtreecommitdiffstats
path: root/src/commands/build.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-02-07 12:35:33 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-02-08 09:37:04 +0100
commitd319579fc89b5ac09f10abf4bfc77c21b0fc65ce (patch)
treee4fb352f3c1cd98383955d08c20fc0d311db51b7 /src/commands/build.rs
parent31fb8c89fefd3167b8b928cd75ddc008da60b434 (diff)
Remove `Artifact` type
This patch follows-up on the shrinking of the `Artifact` type and removes it entirely. The type is not needed. Only the `ArtifactPath` type is needed, which is a thin wrapper around `PathBuf`, ensuring that the path is relative to the store root. The `Artifact` type used `pom` to parse the name and version of the package from the `ArtifactPath` object it contained, which resulted in the restriction that the path must always be <name>-<version>... Which should not be a requirement and actually caused issues with a package named "foo-bar" (as an example). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r--src/commands/build.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index f5c9b5a..b653e29 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -334,8 +334,8 @@ pub async fn build(
if !artifacts.is_empty() {
writeln!(outlock, "Packages created:")?;
}
- artifacts.into_iter().try_for_each(|artifact| {
- writeln!(outlock, "-> {}", staging_dir.join(artifact.path()).display()).map_err(Error::from)
+ artifacts.into_iter().try_for_each(|artifact_path| {
+ writeln!(outlock, "-> {}", staging_dir.join(artifact_path).display()).map_err(Error::from)
})?;
let mut had_error = false;