idk
This commit is contained in:
+28
-6
@@ -20,7 +20,9 @@ use crate::{
|
|||||||
graph::{TaskId, TaskPlan, TaskPlanner, task_recipe_slug},
|
graph::{TaskId, TaskPlan, TaskPlanner, task_recipe_slug},
|
||||||
layout::Layout,
|
layout::Layout,
|
||||||
log,
|
log,
|
||||||
phase::{self, PackageContext, PhaseArg, PhaseContext, PhaseRuntime, PhaseRuntimeGuard, SourceDir},
|
phase::{
|
||||||
|
self, PackageContext, PhaseArg, PhaseContext, PhaseRuntime, PhaseRuntimeGuard, SourceDir,
|
||||||
|
},
|
||||||
recipe::{GitSource, OutputPackage, Recipe, RecipeKind, RecipeSet, Source},
|
recipe::{GitSource, OutputPackage, Recipe, RecipeKind, RecipeSet, Source},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -422,7 +424,11 @@ impl Builder {
|
|||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
log::step("configure", &recipe.key());
|
log::step("configure", &recipe.key());
|
||||||
if let Some(func) = recipe.phases().configure() {
|
if let Some(func) = recipe.phases().configure() {
|
||||||
let ctx = PhaseContext::new(source_dir_for(recipe), prefix_for(recipe.kind()), default_jobs());
|
let ctx = PhaseContext::new(
|
||||||
|
source_dir_for(recipe),
|
||||||
|
prefix_for(recipe.kind()),
|
||||||
|
default_jobs(),
|
||||||
|
);
|
||||||
self.invoke_with_runtime(active, &[PhaseArg::Ctx(ctx)], func)?;
|
self.invoke_with_runtime(active, &[PhaseArg::Ctx(ctx)], func)?;
|
||||||
}
|
}
|
||||||
self.write_recipe_stamp(layout, recipe, "configure")
|
self.write_recipe_stamp(layout, recipe, "configure")
|
||||||
@@ -435,7 +441,11 @@ impl Builder {
|
|||||||
active: &ActiveContainer,
|
active: &ActiveContainer,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
log::step("build", &recipe.key());
|
log::step("build", &recipe.key());
|
||||||
let ctx = PhaseContext::new(source_dir_for(recipe), prefix_for(recipe.kind()), default_jobs());
|
let ctx = PhaseContext::new(
|
||||||
|
source_dir_for(recipe),
|
||||||
|
prefix_for(recipe.kind()),
|
||||||
|
default_jobs(),
|
||||||
|
);
|
||||||
self.invoke_with_runtime(active, &[PhaseArg::Ctx(ctx)], recipe.phases().build())?;
|
self.invoke_with_runtime(active, &[PhaseArg::Ctx(ctx)], recipe.phases().build())?;
|
||||||
self.write_recipe_stamp(layout, recipe, "build")
|
self.write_recipe_stamp(layout, recipe, "build")
|
||||||
}
|
}
|
||||||
@@ -454,7 +464,11 @@ impl Builder {
|
|||||||
&base_env(&active.base_path),
|
&base_env(&active.base_path),
|
||||||
"/",
|
"/",
|
||||||
)?;
|
)?;
|
||||||
let ctx = PhaseContext::new(source_dir_for(recipe), prefix_for(recipe.kind()), default_jobs());
|
let ctx = PhaseContext::new(
|
||||||
|
source_dir_for(recipe),
|
||||||
|
prefix_for(recipe.kind()),
|
||||||
|
default_jobs(),
|
||||||
|
);
|
||||||
let pkg = PackageContext::new(dest);
|
let pkg = PackageContext::new(dest);
|
||||||
self.invoke_with_runtime(
|
self.invoke_with_runtime(
|
||||||
active,
|
active,
|
||||||
@@ -477,7 +491,11 @@ impl Builder {
|
|||||||
&base_env(&active.base_path),
|
&base_env(&active.base_path),
|
||||||
"/",
|
"/",
|
||||||
)?;
|
)?;
|
||||||
let ctx = PhaseContext::new(source_dir_for(recipe), prefix_for(recipe.kind()), default_jobs());
|
let ctx = PhaseContext::new(
|
||||||
|
source_dir_for(recipe),
|
||||||
|
prefix_for(recipe.kind()),
|
||||||
|
default_jobs(),
|
||||||
|
);
|
||||||
let pkg = PackageContext::new(dest.clone());
|
let pkg = PackageContext::new(dest.clone());
|
||||||
self.invoke_with_runtime(
|
self.invoke_with_runtime(
|
||||||
active,
|
active,
|
||||||
@@ -826,7 +844,11 @@ fn source_dir_for(recipe: &Recipe) -> SourceDir {
|
|||||||
if named.is_empty() {
|
if named.is_empty() {
|
||||||
SourceDir::single("/sources")
|
SourceDir::single("/sources")
|
||||||
} else {
|
} else {
|
||||||
SourceDir::named(named.into_iter().map(|(n, _)| (n.to_owned(), format!("/sources/{n}"))))
|
SourceDir::named(
|
||||||
|
named
|
||||||
|
.into_iter()
|
||||||
|
.map(|(n, _)| (n.to_owned(), format!("/sources/{n}"))),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user