build-manifest: remove legacy promote-release support

This commit removes support for the legacy promote-release, as that's
not executed anymore on the nightly channel.
This commit is contained in:
Pietro Albini 2020-11-03 12:15:06 +01:00
parent d662f80855
commit 7704d35acc
No known key found for this signature in database
GPG key ID: 3E06ABE80BAAF19C
3 changed files with 2 additions and 151 deletions

View file

@ -469,7 +469,6 @@ impl<'a> Builder<'a> {
dist::RustDev,
dist::Extended,
dist::BuildManifest,
dist::HashSign
),
Kind::Install => describe!(
install::Docs,

View file

@ -10,9 +10,8 @@
use std::env;
use std::fs;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::process::Command;
use build_helper::{output, t};
@ -2323,61 +2322,6 @@ fn add_env(builder: &Builder<'_>, cmd: &mut Command, target: TargetSelection) {
}
}
#[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HashSign;
impl Step for HashSign {
type Output = ();
const ONLY_HOSTS: bool = true;
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("hash-and-sign")
}
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(HashSign);
}
fn run(self, builder: &Builder<'_>) {
// This gets called by `promote-release`
// (https://github.com/rust-lang/rust-central-station/tree/master/promote-release).
let mut cmd = builder.tool_cmd(Tool::BuildManifest);
if builder.config.dry_run {
return;
}
let sign = builder.config.dist_sign_folder.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.sign-folder` in `config.toml`\n\n")
});
let addr = builder.config.dist_upload_addr.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.upload-addr` in `config.toml`\n\n")
});
let pass = if env::var("BUILD_MANIFEST_DISABLE_SIGNING").is_err() {
let file = builder.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
});
t!(fs::read_to_string(&file))
} else {
String::new()
};
let today = output(Command::new("date").arg("+%Y-%m-%d"));
cmd.arg(sign);
cmd.arg(distdir(builder));
cmd.arg(today.trim());
cmd.arg(addr);
cmd.arg(&builder.config.channel);
cmd.env("BUILD_MANIFEST_LEGACY", "1");
builder.create_dir(&distdir(builder));
let mut child = t!(cmd.stdin(Stdio::piped()).spawn());
t!(child.stdin.take().unwrap().write_all(pass.as_bytes()));
let status = t!(child.wait());
assert!(status.success());
}
}
/// Maybe add libLLVM.so to the given destination lib-dir. It will only have
/// been built if LLVM tools are linked dynamically.
///