From cfca13cc0bb37ed936dc4ff69086a68ad148bfa2 Mon Sep 17 00:00:00 2001 From: rami3l Date: Sun, 14 Apr 2024 16:49:15 +0800 Subject: [PATCH 1/3] dist: bump `rustup` version to `1.27.1` --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- download/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7e01a8c1a..a5a0d3e581 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -513,7 +513,7 @@ dependencies = [ [[package]] name = "download" -version = "1.27.0" +version = "1.27.1" dependencies = [ "anyhow", "curl", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "rustup" -version = "1.27.0" +version = "1.27.1" dependencies = [ "anyhow", "cc", diff --git a/Cargo.toml b/Cargo.toml index 614ffdcadf..8a109a7ecd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustup" -version = "1.27.0" +version = "1.27.1" edition = "2021" description = "Manage multiple rust installations with ease" homepage = "https://github.com/rust-lang/rustup" diff --git a/download/Cargo.toml b/download/Cargo.toml index 3a57be63d9..20279f8d5b 100644 --- a/download/Cargo.toml +++ b/download/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "download" -version = "1.27.0" +version = "1.27.1" edition = "2021" license = "MIT OR Apache-2.0" From 81f2e6ca7d2d7200075c8cdd260d329ce75ecc13 Mon Sep 17 00:00:00 2001 From: rami3l Date: Sun, 14 Apr 2024 18:14:28 +0800 Subject: [PATCH 2/3] feat(dist): improve `changelog_helper` script --- ci/changelog_helper.py | 45 ++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/ci/changelog_helper.py b/ci/changelog_helper.py index c8b50bdbf0..f1537042c9 100644 --- a/ci/changelog_helper.py +++ b/ci/changelog_helper.py @@ -3,16 +3,32 @@ import subprocess import sys +USAGE = """ +Usage: + python changelog_helper.py replace-nums CHANGELOG_MARKDOWN + Replace Rustup PR numbers or links with `[pr#1234]`, moving the actual links to the bottom + + python changelog_helper.py usernames GITHUB_GENERATED_CHANGELOG + Generate a Markdown list of contributors to be pasted below the line `Thanks go to:` + A logged-in GitHub CLI (https://cli.github.com) is required for this subcommand + For a GitHub-generated changelog, see https://github.com/rust-lang/rustup/releases/new +""" + +BOTS = {"renovate": "Renovate Bot"} + def extract_usernames(text): - return sorted(set(re.findall(r"@([\w-]+)", text)), key=str.casefold) + return sorted( + set(re.findall(r"@([\w-]+)", text)), + key=lambda name: (name in BOTS, str.casefold(name)), + ) def github_name(username): # url = f"https://api.github.com/users/{username}" # response = urlopen(url) - if username == "renovate": - return "Renovate Bot" + if username in BOTS: + return BOTS[username] try: response = subprocess.check_output( [ @@ -26,7 +42,7 @@ def github_name(username): ] ) data = json.loads(response) - return data["name"] + return data["name"] or username except Exception as e: print("An error occurred:", str(e)) @@ -42,16 +58,7 @@ def read_file(file_name): def help(): - print("Usage:") - print(" python changelog_helper.py usernames GITHUB_GENERATED_CHANGELOG") - print(" python changelog_helper.py replace-nums CHANGELOG_MARKDOWN") - print() - print( - "A logged-in GitHub CLI (https://cli.github.com) is required for the `usernames` subcommand" - ) - print( - "For a GitHub-generated changelog, see https://github.com/rust-lang/rustup/releases/new" - ) + print(USAGE) sys.exit(1) @@ -72,11 +79,11 @@ def main(): footer = "" if not content: return - for match in re.findall(r"(?<=#)(\d+)", content): - # Replace issue number with fully-qualified link - link = f"[pr#{match}]" - footer += f"{link}: https://github.com/rust-lang/rustup/pull/{match}\n" - content = content.replace(f"#{match}", link) + issue_pat = r"(#|https://github\.com/rust-lang/rustup/pull/)(\d+)" + for prefix, num in re.findall(issue_pat, content): + link = f"[pr#{num}]" + footer += f"{link}: https://github.com/rust-lang/rustup/pull/{num}\n" + content = content.replace(prefix + num, link) print(f"{content}\n{footer}") else: help() From e2e73f9ac9a54117e03ffd84b45ed29755f3bd7e Mon Sep 17 00:00:00 2001 From: rami3l Date: Sun, 14 Apr 2024 18:43:40 +0800 Subject: [PATCH 3/3] docs: update CHANGELOG for v1.27.1 --- CHANGELOG.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcb8138260..cbca0ab0ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,75 @@ # Changelog +## [1.27.1] - 2024-04-14 + +This new Rustup release involves some minor bug fixes. + +The headlines for this release are: + +1. Prebuilt Rustup binaries should be working on older macOS versions again. +2. `rustup-init` will no longer fail when `fish` is installed but `~/.config/fish/conf.d` hasn't been created. +3. Regressions regarding symlinked `RUSTUP_HOME/(toolchains|downloads|tmp)` have been addressed. + +Since the release of 1.27.0, the project has welcomed a total of 7 new contributors. +Many thanks for your hard work, and we hope to see you again! + +### Added + +- Added the logging of `RUSTUP_UPDATE_ROOT` and `RUSTUP_DIST_(SERVER|ROOT)` when `RUSTUP_DEBUG` is set [pr#3722] + +### Changed + +- Ensured that CI builds target macOS 10.12+ on x64 and macOS 11.0+ on arm64 [pr#3710] +- Fixed an error when writing to rcfiles by ensuring the creation of their parent dir(s) first [pr#3712] +- Fixed unexpected errors when `RUSTUP_HOME/(toolchains|downloads|tmp)` is symlinked [pr#3742] [pr#3754] +- Fixed an unexpected error when removing a component by component name with explicit target triple [pr#3601] +- Changed `RUSTUP_WINDOWS_PATH_ADD_BIN` to be false by default [pr#3703] +- Fixed incorrect color state after `ColorableTerminal::reset` [pr#3711] +- Replaced `.` with `source` in fish shell's `source_string` [pr#3715] +- Fixed "component add" error message format [pr#3724] +- Fixed file paths in CI-generated `*.sha256` files on *nix [pr#3730] +- Removed an unnecessary debug print [pr#3734] +- Disabled the "doc opening" output on `rustup doc --path` [pr#3748] +- Fixed the update of `DisplayVersion` in the Windows registry on `rustup self update` [pr#3770] +- Bumped a lot of dependencies to their latest versions [pr#renovate-bot] + +Thanks go to: + +- Anas (0x61nas) +- cuiyourong (cuiyourong) +- Dirkjan Ochtman (djc) +- Eric Huss (ehuss) +- eth3lbert (eth3lbert) +- hev (heiher) +- klensy (klensy) +- Chih Wang (ongchi) +- Adam (pie-flavor) +- rami3l (rami3l) +- Robert (rben01) +- Robert Collins (rbtcollins) +- Sun Bin (shandongbinzhou) +- Samuel Moelius (smoelius) +- vpochapuis (vpochapuis) +- Renovate Bot (renovate) + +**Full Changelog**: https://github.com/rust-lang/rustup/compare/1.27.0...1.27.1 + +[1.27.1]: https://github.com/rust-lang/rustup/releases/tag/1.27.1 +[pr#3601]: https://github.com/rust-lang/rustup/pull/3601 +[pr#3703]: https://github.com/rust-lang/rustup/pull/3703 +[pr#3711]: https://github.com/rust-lang/rustup/pull/3711 +[pr#3715]: https://github.com/rust-lang/rustup/pull/3715 +[pr#3710]: https://github.com/rust-lang/rustup/pull/3710 +[pr#3712]: https://github.com/rust-lang/rustup/pull/3712 +[pr#3722]: https://github.com/rust-lang/rustup/pull/3722 +[pr#3724]: https://github.com/rust-lang/rustup/pull/3724 +[pr#3730]: https://github.com/rust-lang/rustup/pull/3730 +[pr#3734]: https://github.com/rust-lang/rustup/pull/3734 +[pr#3748]: https://github.com/rust-lang/rustup/pull/3748 +[pr#3742]: https://github.com/rust-lang/rustup/pull/3742 +[pr#3754]: https://github.com/rust-lang/rustup/pull/3754 +[pr#3770]: https://github.com/rust-lang/rustup/pull/3770 + ## [1.27.0] - 2024-03-08 This long-awaited Rustup release has gathered all the new features and fixes since April 2023.