summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/commands/build.rs11
-rw-r--r--src/commands/release.rs2
-rw-r--r--src/db/find_artifacts.rs2
-rw-r--r--src/package/version.rs2
4 files changed, 12 insertions, 5 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index afe0e45..07d2ce8 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -98,7 +98,7 @@ pub async fn build(
trace!("Repository HEAD = {}", hash_str);
let phases = config.available_phases();
- let endpoint_configurations = config
+ let mut endpoint_configurations = config
.docker()
.endpoints()
.iter()
@@ -111,7 +111,14 @@ pub async fn build(
.required_docker_api_versions(config.docker().docker_api_versions().clone())
.build()
})
- .collect();
+ .collect::<Vec<_>>();
+ {
+ // Because we're loading always sequencially, to have a bit more spread over the endpoints,
+ // shuffle the endpoints here. Not a perfect solution, but a working one.
+ use rand::Rng;
+ let mut rng = rand::thread_rng();
+ rng.shuffle(&mut endpoint_configurations);
+ }
info!("Endpoint config build");
let pname = matches
diff --git a/src/commands/release.rs b/src/commands/release.rs
index 40daf8e..2910810 100644
--- a/src/commands/release.rs
+++ b/src/commands/release.rs
@@ -163,7 +163,7 @@ async fn new_release(
}
// else !dest_path.exists()
- tokio::fs::rename(art_path, dest_path)
+ tokio::fs::copy(art_path, dest_path)
.await
.map_err(Error::from)
.map(|_| art)
diff --git a/src/db/find_artifacts.rs b/src/db/find_artifacts.rs
index b4fbe3b..23c6a63 100644
--- a/src/db/find_artifacts.rs
+++ b/src/db/find_artifacts.rs
@@ -185,7 +185,7 @@ pub fn find_artifacts<'a>(
.any(|(key, value)| k == key.as_ref() && v == value)
});
- trace!("Filder result = {}", filter_result);
+ trace!("Filter result = {}", filter_result);
Ok((tpl.0, filter_result))
} else {
trace!("Not filtering environment...");
diff --git a/src/package/version.rs b/src/package/version.rs
index 359c80f..696de48 100644
--- a/src/package/version.rs
+++ b/src/package/version.rs
@@ -107,7 +107,7 @@ impl From<String> for PackageVersion {
}
impl PackageVersion {
- pub fn parser<'a>() -> PomParser<'a, u8, Self> {
+ fn parser<'a>() -> PomParser<'a, u8, Self> {
(numbers() + ((dash() | under() | dot() | letters() | numbers()).repeat(0..)))
.collect()
.convert(|b| String::from_utf8(b.to_vec()).map(Self::from))