]> git.lizzy.rs Git - rust.git/commitdiff
when BUILD_MANIFEST_DISABLE_SIGNING is set, we don't need gpg-password-file
authorRalf Jung <post@ralfj.de>
Sat, 14 Sep 2019 10:49:04 +0000 (12:49 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 14 Sep 2019 10:49:04 +0000 (12:49 +0200)
src/bootstrap/dist.rs

index 500d5766a899e4945874793483f1630daf55a8b1..076bcd878df7196a23fa23d0b4c617ba88850d41 100644 (file)
@@ -2000,6 +2000,8 @@ fn make_run(run: RunConfig<'_>) {
     }
 
     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;
@@ -2010,10 +2012,14 @@ fn run(self, builder: &Builder<'_>) {
         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 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")
-        });
-        let pass = t!(fs::read_to_string(&file));
+        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"));