|
| 1 | +use futures::TryFutureExt; |
| 2 | +use miette::Diagnostic; |
| 3 | +use prodash::{messages::MessageLevel, tree::Item}; |
| 4 | +use tokio::{task::JoinSet, time::Instant}; |
| 5 | + |
1 | 6 | use crate::{ |
2 | 7 | builder::{bazel::BazelBuilder, docker::DockerBuilder, ko::KoBuilder, nix::NixBuilder}, |
3 | 8 | config::{Build, Config}, |
4 | 9 | image::Image, |
5 | 10 | }; |
6 | 11 |
|
7 | | -use futures::TryFutureExt; |
8 | | -use miette::Diagnostic; |
9 | | -use prodash::{messages::MessageLevel, tree::Item}; |
10 | | -use tokio::{task::JoinSet, time::Instant}; |
11 | | - |
12 | 12 | mod bazel; |
13 | 13 | mod docker; |
14 | 14 | mod ko; |
@@ -130,14 +130,14 @@ impl MetaBuild { |
130 | 130 | let config = Arc::clone(&self.config); |
131 | 131 | let mut set = JoinSet::default(); |
132 | 132 |
|
133 | | - pb.init(Some(config.services.len()), None); |
| 133 | + pb.init(Some(config.build.len()), None); |
134 | 134 | pb.message(MessageLevel::Info, format!("detected platform: {platform}")); |
135 | 135 |
|
136 | | - for (name, service) in config.services.iter() { |
| 136 | + for (name, build) in config.build.iter() { |
137 | 137 | let progress = pb.add_child(name); |
138 | 138 | let ctx = Context::new(name.clone(), platform.to_string(), ()); |
139 | 139 |
|
140 | | - match &service.build { |
| 140 | + match &build { |
141 | 141 | Build::Ko(ko) => { |
142 | 142 | set.spawn( |
143 | 143 | run_builder(&mut self.ko, progress, ctx.with(ko.clone()))? |
@@ -175,7 +175,7 @@ impl MetaBuild { |
175 | 175 | let elapsed = instant.elapsed(); |
176 | 176 |
|
177 | 177 | pb.message( |
178 | | - MessageLevel::Info, |
| 178 | + MessageLevel::Success, |
179 | 179 | format!("build completed in {elapsed:?}"), |
180 | 180 | ); |
181 | 181 |
|
|
0 commit comments