about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-05 19:43:04 +0000
committerbors <bors@rust-lang.org>2023-11-05 19:43:04 +0000
commitc1ccc29cd6eeb79f24511d75e9db553385a5d73f (patch)
tree08d60e691459c9fc624528f6d035571110653404
parent5103173af1948430886534268d8f18b7e8386234 (diff)
parent0e8f15519745c788d976ce43991978963fe79e7a (diff)
downloadrust-c1ccc29cd6eeb79f24511d75e9db553385a5d73f.tar.gz
rust-c1ccc29cd6eeb79f24511d75e9db553385a5d73f.zip
Auto merge of #117191 - Skgland:easy-beta-channels, r=Mark-Simulacrum
generate beta manifests as pre-requisit to rust-lang/rustup#1329

<https://github.com/rust-lang/rustup/issues/1329#issuecomment-1134946736> mentioned (a while ago) this would be the next step
-rw-r--r--src/tools/build-manifest/src/main.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs
index 2c795ebb214..aed6796fa13 100644
--- a/src/tools/build-manifest/src/main.rs
+++ b/src/tools/build-manifest/src/main.rs
@@ -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") {