Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Don't produce nightlies missing the RLS
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jan 25, 2018
1 parent 348980b commit 913a3b3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions promote-release/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ impl Context {
return println!("version hasn't changed, skipping");
}

self.assert_all_components_present();

// Ok we've now determined that a release needs to be done. Let's
// configure rust, sign the artifacts we just downloaded, and upload the
// signatures to the CI bucket.
Expand Down Expand Up @@ -251,6 +253,28 @@ upload-addr = \"{}/{}\"
prev_version == current_version
}

/// An emergency fix for the current situation where the RLS isn't available
/// too often. Don't produce nightlies if a missing component happens.
///
/// Note that we already shouldn't merge PRs in rust-lang/rust that don't
/// build the rls/rustfmt
fn assert_all_components_present(&self) {
if self.release != "nightly" {
return
}
let components = t!(self.dl_dir().read_dir())
.map(|e| t!(e))
.map(|e| e.file_name().into_string().unwrap())
.filter(|s| s.contains("x86_64-unknown-linux-gnu"))
.collect::<Vec<_>>();
println!("components in this nightly {:?}", components);
assert!(components.iter().any(|s| s.starts_with("rls-")));
assert!(components.iter().any(|s| s.starts_with("rustfmt-")));
assert!(components.iter().any(|s| s.starts_with("rustc-")));
assert!(components.iter().any(|s| s.starts_with("rust-std-")));
assert!(components.iter().any(|s| s.starts_with("cargo-")));
}

fn download_artifacts(&mut self, rev: &str) {
let dl = self.dl_dir();
drop(fs::remove_dir_all(&dl));
Expand Down

0 comments on commit 913a3b3

Please sign in to comment.