Skip to content

Commit

Permalink
generate beta manifests as pre-requisit rust-lang/rustup#1329
Browse files Browse the repository at this point in the history
<rust-lang/rustup#1329 (comment)> mentioned this would be the next step

(cherry picked from commit 0e8f155)
  • Loading branch information
Skgland committed Oct 29, 2023
1 parent 489647f commit 183379c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,29 @@ impl Builder {
// channel-rust-1.XX.toml
let major_minor = rust_version.split('.').take(2).collect::<Vec<_>>().join(".");
self.write_channel_files(&major_minor, &manifest);
} else if channel == "beta" {
// channel-rust-1.XX.YY-beta.Z.toml
let rust_version = self
.versions
.version(&PkgType::Rust)
.expect("missing Rust tarball")
.version
.expect("missing Rust version")
.split(' ')
.next()
.unwrap()
.to_string();
self.write_channel_files(&rust_version, &manifest);

// channel-rust-1.XX.YY-beta.toml
let major_minor_patch_beta =
rust_version.split('.').take(3).collect::<Vec<_>>().join(".");
self.write_channel_files(&major_minor_patch_beta, &manifest);

// channel-rust-1.XX-beta.toml
let major_minor_beta =
format!("{}-beta", rust_version.split('.').take(2).collect::<Vec<_>>().join("."));
self.write_channel_files(&major_minor_beta, &manifest);
}

if let Some(path) = std::env::var_os("BUILD_MANIFEST_SHIPPED_FILES_PATH") {
Expand Down

0 comments on commit 183379c

Please sign in to comment.