diff --git a/Earthfile b/Earthfile index 92e21b16..e9da8397 100644 --- a/Earthfile +++ b/Earthfile @@ -37,15 +37,27 @@ lint: DO rust+CARGO --args="clippy" DO rust+CARGO --args="clippy --all-features" DO rust+CARGO --args="clippy --no-default-features" + DO rust+CARGO --args="clippy --no-default-features --features stages" + DO rust+CARGO --args="clippy --no-default-features --features copy" + DO rust+CARGO --args="clippy --no-default-features --features multi-recipe" + DO rust+CARGO --args="clippy --no-default-features --features iso" + DO rust+CARGO --args="clippy --no-default-features --features switch" + DO rust+CARGO --args="clippy --no-default-features --features sigstore" test: FROM +common COPY --dir test-files/ integration-tests/ /app COPY +cosign/cosign /usr/bin/cosign - DO rust+CARGO --args="test --workspace -- --show-output" - DO rust+CARGO --args="test --workspace --all-features -- --show-output" - DO rust+CARGO --args="test --workspace --no-default-features -- --show-output" + DO rust+CARGO --args="test --workspace" + DO rust+CARGO --args="test --workspace --all-features" + DO rust+CARGO --args="test --workspace --no-default-features" + DO rust+CARGO --args="test --workspace --no-default-features --features stages" + DO rust+CARGO --args="test --workspace --no-default-features --features copy" + DO rust+CARGO --args="test --workspace --no-default-features --features multi-recipe" + DO rust+CARGO --args="test --workspace --no-default-features --features iso" + DO rust+CARGO --args="test --workspace --no-default-features --features switch" + DO rust+CARGO --args="test --workspace --no-default-features --features sigstore" install: FROM +common diff --git a/src/commands/generate_iso.rs b/src/commands/generate_iso.rs index 9c84b827..b493ed83 100644 --- a/src/commands/generate_iso.rs +++ b/src/commands/generate_iso.rs @@ -149,7 +149,7 @@ impl BlueBuildCommand for GenerateIsoCommand { #[cfg(not(feature = "multi-recipe"))] let mut build_command = { BuildCommand::builder() - .recipe(recipe.to_path_buf()) + .recipe(recipe.clone()) .archive(image_out_dir.path()) .build() }; diff --git a/src/commands/switch.rs b/src/commands/switch.rs index 0808ca90..d530acf5 100644 --- a/src/commands/switch.rs +++ b/src/commands/switch.rs @@ -66,12 +66,20 @@ impl BlueBuildCommand for SwitchCommand { let tempdir = TempDir::new("oci-archive").into_diagnostic()?; trace!("{tempdir:?}"); + #[cfg(feature = "multi-recipe")] BuildCommand::builder() .recipe([self.recipe.clone()]) .archive(tempdir.path()) .force(self.force) .build() .try_run()?; + #[cfg(not(feature = "multi-recipe"))] + BuildCommand::builder() + .recipe(self.recipe.clone()) + .archive(tempdir.path()) + .force(self.force) + .build() + .try_run()?; let recipe = Recipe::parse(&self.recipe)?; let image_file_name = format!(