summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-04-21 15:29:10 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-04-21 15:29:10 +0200
commit17aea85fb6a923313c62939c382445052b2f62dc (patch)
tree5eac2eb5eda02bad4d3763e1daf6e4650f4584d0
parent38b6ded40c6d840c9d3951f0a082cd55b1b0109c (diff)
Subcommand "release new": Print pathes of released files
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/commands/release.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/release.rs b/src/commands/release.rs
index 2910810..0bc59bb 100644
--- a/src/commands/release.rs
+++ b/src/commands/release.rs
@@ -163,21 +163,22 @@ async fn new_release(
}
// else !dest_path.exists()
- tokio::fs::copy(art_path, dest_path)
+ tokio::fs::copy(art_path, &dest_path)
.await
.map_err(Error::from)
- .map(|_| art)
+ .map(|_| (art, dest_path))
}
})
.collect::<futures::stream::FuturesUnordered<_>>()
.collect::<Result<Vec<_>>>()
.await?
.into_iter()
- .try_for_each(|art| {
+ .try_for_each(|(art, dest_path)| {
debug!("Updating {:?} to set released = true", art);
let rel = crate::db::models::Release::create(&conn, &art, &now, &release_store)?;
debug!("Release object = {:?}", rel);
- Ok(())
+
+ writeln!(std::io::stdout(), "{}", dest_path.display()).map_err(Error::from)
})
}