Skip to content

Commit

Permalink
assert expected json files in rust-docs-json component
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Aug 4, 2024
1 parent 2ac0969 commit 491edbf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,18 @@ impl Step for JsonDocs {
));

let dest = "share/doc/rust/json";
let out = builder.json_doc_out(host);

// Make sure these are present in the component.
#[cfg(not(feature = "bootstrap-self-test"))]
for f in ["alloc.json", "core.json", "std.json"] {
assert!(out.join(f).exists(), "rust-docs-json is missing `{f}`.");
}

let mut tarball = Tarball::new(builder, "rust-docs-json", &host.triple);
tarball.set_product_name("Rust Documentation In JSON Format");
tarball.is_preview(true);
tarball.add_bulk_dir(builder.json_doc_out(host), dest);
tarball.add_bulk_dir(out, dest);
Some(tarball.generate())
}
}
Expand Down

0 comments on commit 491edbf

Please sign in to comment.