From 2033eb1495b4a0386a0ab08815769477baf20c89 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Sun, 30 Aug 2020 09:56:20 -0400 Subject: [PATCH 1/2] Write manifest for MAJOR.MINOR channel to enable rustup convenience This connects to https://github.com/rust-lang/rustup/issues/794. It's hard to remember if there have been patch releases for old versions when you'd like to install the latest in a MAJOR.MINOR series. When we're doing a stable release, we write duplicate manifests to `stable`. With this change, only when we're doing a stable release, also write duplicate manifests to `MAJOR.MINOR` to eventually enable rustup (and any other tooling that builds Rust release URLs) to request, say, `1.45` and get `1.45.2` (assuming `1.45.2` is the latest available `1.45` and assuming that we never publish patch releases out of order). --- src/tools/build-manifest/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index be3e862e7aecd..5170833660086 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -293,6 +293,8 @@ impl Builder { self.write_channel_files(self.versions.channel(), &manifest); if self.versions.channel() != rust_version { self.write_channel_files(&rust_version, &manifest); + let major_minor = rust_version.split('.').take(2).collect::>().join("."); + self.write_channel_files(&major_minor, &manifest); } } From a8fe6544482593073118dbdc3b25c2fb1fa7506c Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" <193874+carols10cents@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:06:45 -0400 Subject: [PATCH 2/2] Write MAJOR.MINOR manifest for stable channel only --- src/tools/build-manifest/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 5170833660086..e1dc9111bf326 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -293,6 +293,8 @@ impl Builder { self.write_channel_files(self.versions.channel(), &manifest); if self.versions.channel() != rust_version { self.write_channel_files(&rust_version, &manifest); + } + if self.versions.channel() == "stable" { let major_minor = rust_version.split('.').take(2).collect::>().join("."); self.write_channel_files(&major_minor, &manifest); }