Skip to content

Commit ee83402

Browse files
committed
when BUILD_MANIFEST_DISABLE_SIGNING is set, we don't need gpg-password-file
1 parent 3287a65 commit ee83402

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/bootstrap/dist.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,8 @@ impl Step for HashSign {
20002000
}
20012001

20022002
fn run(self, builder: &Builder<'_>) {
2003+
// This gets called by `promote-release`
2004+
// (https://github.com/rust-lang/rust-central-station/tree/master/promote-release).
20032005
let mut cmd = builder.tool_cmd(Tool::BuildManifest);
20042006
if builder.config.dry_run {
20052007
return;
@@ -2010,10 +2012,14 @@ impl Step for HashSign {
20102012
let addr = builder.config.dist_upload_addr.as_ref().unwrap_or_else(|| {
20112013
panic!("\n\nfailed to specify `dist.upload-addr` in `config.toml`\n\n")
20122014
});
2013-
let file = builder.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
2014-
panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
2015-
});
2016-
let pass = t!(fs::read_to_string(&file));
2015+
let pass = if env::var("BUILD_MANIFEST_DISABLE_SIGNING").is_err() {
2016+
let file = builder.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
2017+
panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
2018+
});
2019+
t!(fs::read_to_string(&file))
2020+
} else {
2021+
String::new()
2022+
};
20172023

20182024
let today = output(Command::new("date").arg("+%Y-%m-%d"));
20192025

0 commit comments

Comments
 (0)