Skip to content

Commit

Permalink
Don't verify wasm-encoder and wasmparser publishes because of circula…
Browse files Browse the repository at this point in the history
…r dev dep
  • Loading branch information
fitzgen committed Oct 12, 2023
1 parent 98e18f7 commit adb5d34
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ci/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"wasm-tools",
];

const NO_VERIFY: &[&str] = &[
// Circular dev dependencies between `wasmparser` and `wasm-encoder`.
"wasm-encoder",
"wasmparser",
];

#[derive(Clone)]
struct Crate {
manifest: PathBuf,
Expand Down Expand Up @@ -327,11 +333,15 @@ fn publish(krate: &Crate) -> bool {
return true;
}

let status = Command::new("cargo")
.arg("publish")
.current_dir(krate.manifest.parent().unwrap())
.status()
.expect("failed to run cargo");
let mut cmd = Command::new("cargo");
cmd.arg("publish");
cmd.current_dir(krate.manifest.parent().unwrap());

if NO_VERIFY.iter().any(|s| *s == krate.name) {
cmd.arg("--no-verify");
}

let status = cmd.status().expect("failed to run cargo");
if !status.success() {
println!("FAIL: failed to publish `{}`: {}", krate.name, status);
return false;
Expand Down

0 comments on commit adb5d34

Please sign in to comment.