Skip to content

Commit 27ac1b6

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
include all manifests when a release generates multiple ones
1 parent 934ea56 commit 27ac1b6

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/main.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -720,13 +720,22 @@ impl Context {
720720
.upload_addr
721721
.trim_start_matches("https://")
722722
.trim_start_matches("http://");
723-
manifest.write_all(
724-
format!(
725-
"{}/{}/{}/channel-rust-{}.toml\n",
726-
upload_addr, self.config.upload_dir, self.date, self.config.channel
727-
)
728-
.as_bytes(),
729-
)?;
723+
724+
// Stable and beta releases include multiple manifests for the same release. Make sure to
725+
// write all of them in manifests.txt.
726+
for entry in self.dl_dir().read_dir()? {
727+
let os_name = entry?.file_name();
728+
let name = os_name.to_str().expect("non utf-8 file");
729+
if name.starts_with("channel-rust-") && name.ends_with(".toml") {
730+
manifest.write_all(
731+
format!(
732+
"{upload_addr}/{}/{}/{name}\n",
733+
self.config.upload_dir, self.date,
734+
)
735+
.as_bytes(),
736+
)?;
737+
}
738+
}
730739

731740
run(self
732741
.aws_s3api()

0 commit comments

Comments
 (0)