From e565f92519d3e1799c954b5ac5cee3d7d324bf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Tue, 17 Dec 2024 15:35:41 -0800 Subject: [PATCH 1/3] fix: cyclonedx is used in global builds We should only check this in global builds, not local. --- cargo-dist/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cargo-dist/src/lib.rs b/cargo-dist/src/lib.rs index b02525e7c..c3fc41ab3 100644 --- a/cargo-dist/src/lib.rs +++ b/cargo-dist/src/lib.rs @@ -65,8 +65,11 @@ pub fn do_env_test(cfg: &Config) -> DistResult<()> { let builds = dist.config.builds; + // cargo-auditable is used only in local builds let need_cargo_auditable = builds.cargo.cargo_auditable && !global_builds; - let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && !global_builds; + // cyclonedx is used only in global builds + let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && global_builds; + // omnibor is used in both local and global builds let need_omnibor = builds.omnibor; let mut need_xwin = false; let mut need_zigbuild = false; From 5d6c951c404eac7b0512091b23929f0d7d26661a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Tue, 17 Dec 2024 15:36:29 -0800 Subject: [PATCH 2/3] fix: change check to local builds --- cargo-dist/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cargo-dist/src/lib.rs b/cargo-dist/src/lib.rs index c3fc41ab3..5d5efb34f 100644 --- a/cargo-dist/src/lib.rs +++ b/cargo-dist/src/lib.rs @@ -61,14 +61,17 @@ mod tests; pub fn do_env_test(cfg: &Config) -> DistResult<()> { let (dist, _manifest) = tasks::gather_work(cfg)?; - let global_builds = cfg.artifact_mode == ArtifactMode::Global; + let local_builds = matches!( + cfg.artifact_mode, + ArtifactMode::Local | ArtifactMode::All | ArtifactMode::Host + ); let builds = dist.config.builds; // cargo-auditable is used only in local builds - let need_cargo_auditable = builds.cargo.cargo_auditable && !global_builds; + let need_cargo_auditable = builds.cargo.cargo_auditable && local_builds; // cyclonedx is used only in global builds - let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && global_builds; + let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && !local_builds; // omnibor is used in both local and global builds let need_omnibor = builds.omnibor; let mut need_xwin = false; From a0b35e1cda3370730213f1132289ab8b3120f094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Wed, 18 Dec 2024 09:25:17 -0800 Subject: [PATCH 3/3] fix: remove cyclonedx check for now --- cargo-dist/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/cargo-dist/src/lib.rs b/cargo-dist/src/lib.rs index 5d5efb34f..37ce5e1db 100644 --- a/cargo-dist/src/lib.rs +++ b/cargo-dist/src/lib.rs @@ -70,8 +70,6 @@ pub fn do_env_test(cfg: &Config) -> DistResult<()> { // cargo-auditable is used only in local builds let need_cargo_auditable = builds.cargo.cargo_auditable && local_builds; - // cyclonedx is used only in global builds - let need_cargo_cyclonedx = builds.cargo.cargo_cyclonedx && !local_builds; // omnibor is used in both local and global builds let need_omnibor = builds.omnibor; let mut need_xwin = false; @@ -111,7 +109,6 @@ pub fn do_env_test(cfg: &Config) -> DistResult<()> { // Vec>>. let all_tools: Vec>> = vec![ need_cargo_auditable.then(|| tools.cargo_auditable()), - need_cargo_cyclonedx.then(|| tools.cargo_cyclonedx()), need_omnibor.then(|| tools.omnibor()), need_xwin.then(|| tools.cargo_xwin()), need_zigbuild.then(|| tools.cargo_zigbuild()),