Skip to content

End all lines in src/stage0 with trailing newline #139721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/stage0
Original file line number Diff line number Diff line change
@@ -476,4 +476,4 @@ dist/2025-04-02/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=e67a33440c3e021ff2
dist/2025-04-02/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=0ea7e17d7bb67d6a6c4b2f864aaffcd96512f15f17f0acc63751eb1df6c486a7
dist/2025-04-02/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=b73d37b704ab58921172cc561f5598db6a504dcd4d7980966f7c26caaf6d3594
dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542
dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843
dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843
25 changes: 13 additions & 12 deletions src/tools/bump-stage0/src/main.rs
Original file line number Diff line number Diff line change
@@ -65,32 +65,33 @@ impl Tool {
nightly_branch,
} = &self.config;

file_content.push_str(&format!("dist_server={}", dist_server));
file_content.push_str(&format!("\nartifacts_server={}", artifacts_server));
file_content.push_str(&format!("dist_server={}\n", dist_server));
file_content.push_str(&format!("artifacts_server={}\n", artifacts_server));
file_content.push_str(&format!(
"\nartifacts_with_llvm_assertions_server={}",
"artifacts_with_llvm_assertions_server={}\n",
artifacts_with_llvm_assertions_server
));
file_content.push_str(&format!("\ngit_merge_commit_email={}", git_merge_commit_email));
file_content.push_str(&format!("\ngit_repository={}", git_repository));
file_content.push_str(&format!("\nnightly_branch={}", nightly_branch));
file_content.push_str(&format!("git_merge_commit_email={}\n", git_merge_commit_email));
file_content.push_str(&format!("git_repository={}\n", git_repository));
file_content.push_str(&format!("nightly_branch={}\n", nightly_branch));

file_content.push_str("\n\n");
file_content.push_str("\n");
file_content.push_str(COMMENTS);
file_content.push_str("\n");

let compiler = self.detect_compiler()?;
file_content.push_str(&format!("\ncompiler_date={}", compiler.date));
file_content.push_str(&format!("\ncompiler_version={}", compiler.version));
file_content.push_str(&format!("compiler_date={}\n", compiler.date));
file_content.push_str(&format!("compiler_version={}\n", compiler.version));

if let Some(rustfmt) = self.detect_rustfmt()? {
file_content.push_str(&format!("\nrustfmt_date={}", rustfmt.date));
file_content.push_str(&format!("\nrustfmt_version={}", rustfmt.version));
file_content.push_str(&format!("rustfmt_date={}\n", rustfmt.date));
file_content.push_str(&format!("rustfmt_version={}\n", rustfmt.version));
}

file_content.push_str("\n");

for (key, value) in self.checksums {
file_content.push_str(&format!("\n{}={}", key, value));
file_content.push_str(&format!("{}={}\n", key, value));
}

std::fs::write(PATH, file_content)?;