Skip to content

Commit

Permalink
Rollup merge of rust-lang#135221 - Urgau:replace-in-stable-book, r=pi…
Browse files Browse the repository at this point in the history
…etroalbini

Include rustc and rustdoc book in replace-version-placeholder

This PR includes the *(stable)* rustc and rustdoc books which might contain `CURRENT_RUSTC_VERSION` that should be replaced when branching beta. Include them so they are not forgotten.

I didn't include any other folder or books as they don't strike me as relevant for it and might be problematic in the future if some of the submodules are turned into subtree, because we have places where we wouldn't want to replace them.

cf. rust-lang#135163 (comment)
cc `@pietroalbini`
  • Loading branch information
matthiaskrgr authored Jan 9, 2025
2 parents bbf6363 + eadb76e commit 29c17fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tools/replace-version-placeholder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ fn main() {
let version_str = t!(std::fs::read_to_string(&version_path), version_path);
let version_str = version_str.trim();
walk::walk_many(
&[&root_path.join("compiler"), &root_path.join("library")],
&[
&root_path.join("compiler"),
&root_path.join("library"),
&root_path.join("src/doc/rustc"),
&root_path.join("src/doc/rustdoc"),
],
|path, _is_dir| walk::filter_dirs(path),
&mut |entry, contents| {
if !contents.contains(VERSION_PLACEHOLDER) {
Expand Down

0 comments on commit 29c17fc

Please sign in to comment.