Skip to content
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

add builder-config into tarball sources #128822

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,11 @@ impl Config {
// Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
// but not if `config.toml` hasn't been created.
let mut toml = if !using_default_path || toml_path.exists() {
config.config = Some(toml_path.clone());
config.config = Some(if cfg!(not(feature = "bootstrap-self-test")) {
Kobzol marked this conversation as resolved.
Show resolved Hide resolved
toml_path.canonicalize().unwrap()
} else {
toml_path.clone()
});
get_toml(&toml_path)
} else {
config.config = None;
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/src/utils/tarball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ impl<'a> Tarball<'a> {
channel::write_commit_hash_file(&self.overlay_dir, &info.sha);
channel::write_commit_info_file(&self.overlay_dir, info);
}

// Add config file if present.
if let Some(config) = &self.builder.config.config {
self.add_renamed_file(config, &self.overlay_dir, "builder-config");
}

for file in self.overlay.legal_and_readme() {
self.builder.install(&self.builder.src.join(file), &self.overlay_dir, 0o644);
}
Expand Down
Loading