diff options
| author | Hermes Agent <hermes@localhost> | 2026-08-12 00:04:41 +0000 |
|---|---|---|
| committer | Hermes Agent <hermes@localhost> | 2026-08-12 00:04:41 +0000 |
| commit | c24c00c1d89990d44d796c4fd2b84e92162b044a (patch) | |
| tree | a58cd6fc3aaf473463dd1e51315043064787f53f /src/plan.rs | |
| parent | 191e2b7429ff4547b5fdd0fbfcff943ce96c2d68 (diff) | |
Add validated image build stage graph
Diffstat (limited to 'src/plan.rs')
| -rw-r--r-- | src/plan.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plan.rs b/src/plan.rs index 16158e5..3d28d96 100644 --- a/src/plan.rs +++ b/src/plan.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use crate::ImageSpec; +use crate::{ImageSpec, Stage}; #[derive(Debug, Clone, PartialEq, Eq)] pub struct BuildPlan { @@ -16,4 +16,12 @@ impl BuildPlan { pub fn spec(&self) -> &ImageSpec { &self.spec } + + pub fn stages(&self) -> &'static [Stage] { + &Stage::ORDERED + } + + pub fn dependencies(&self, stage: Stage) -> &'static [Stage] { + stage.dependencies() + } } |