Skip to content

Commit

Permalink
Auto merge of #117191 - Skgland:easy-beta-channels, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
generate beta manifests as pre-requisit to rust-lang/rustup#1329

<rust-lang/rustup#1329 (comment)> mentioned (a while ago) this would be the next step
  • Loading branch information
bors committed Nov 5, 2023
2 parents 5103173 + 0e8f155 commit c1ccc29
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 @@ -266,6 +266,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 c1ccc29

Please sign in to comment.