From 346f322c623782e3616b97ea8b1572555d767c3d Mon Sep 17 00:00:00 2001 From: Azalea Date: Wed, 23 Sep 2026 01:28:13 +0000 Subject: [PATCH] [U] Release - Bump version to 2.1.1-rc1 and support prerelease tags --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 12 ++++++++++++ docs/hyfetch.1 | 4 ++-- hyfetch/__version__.py | 2 +- package.json | 2 +- tools/release.py | 36 ++++++++++++++++++------------------ 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1cae8399..878c6787 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hyfetch" -version = "2.1.0" +version = "2.1.1-rc1" dependencies = [ "aho-corasick", "ansi_colours", diff --git a/Cargo.toml b/Cargo.toml index cb9978e6..c416fe79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*"] [workspace.package] -version = "2.1.0" +version = "2.1.1-rc1" authors = ["Azalea Gui "] edition = "2021" rust-version = "1.75.0" diff --git a/README.md b/README.md index c799864a..393c1734 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,18 @@ cargo install --git https://github.com/hykilpikonna/hyfetch +### 2.1.1 + +**✨ Features & Enhancements** + +* Added `berrisexual` & `almondsexual` flags ([#545](https://github.com/hykilpikonna/hyfetch/issues/545)). +* Published crate to crates.io with automated OIDC publishing ([#544](https://github.com/hykilpikonna/hyfetch/issues/544)). + +**🐛 Bug Fixes** + +* Fixed `cachyos_small` distro variant displaying as `/` ([#540](https://github.com/hykilpikonna/hyfetch/issues/540)). +* Fixed crates.io packaging to include README, data assets, and embedded neofetch script for `cargo install`. + ### 2.1.0 Changes since `2.1.0-rc1`. diff --git a/docs/hyfetch.1 b/docs/hyfetch.1 index 61d84f61..c2336f15 100644 --- a/docs/hyfetch.1 +++ b/docs/hyfetch.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH VERSION: "1" "June 2026" "Version: 2.1.0" "User Commands" +.TH VERSION: "1" "June 2026" "Version: 2.1.1-rc1" "User Commands" .SH NAME -Version: \- manual page for Version: 2.1.0 +Version: \- manual page for Version: 2.1.1-rc1 .SH SYNOPSIS .B hyfetch [\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR diff --git a/hyfetch/__version__.py b/hyfetch/__version__.py index 98dc6085..e570d187 100644 --- a/hyfetch/__version__.py +++ b/hyfetch/__version__.py @@ -1,3 +1,3 @@ from __future__ import annotations -VERSION = '2.1.0' +VERSION = '2.1.1-rc1' diff --git a/package.json b/package.json index e8efe5d2..eae7115f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "neowofetch", - "version": "2.1.0", + "version": "2.1.1-rc1", "description": "Updated neofetch", "repository": { "type": "git", diff --git a/tools/release.py b/tools/release.py index 9b3bb6bc..8603c0ed 100755 --- a/tools/release.py +++ b/tools/release.py @@ -12,7 +12,7 @@ from typing import Optional, Set, Tuple ROOT = Path(__file__).resolve().parents[1] -VERSION_RE = re.compile(r"^v?(?P[0-9]+\.[0-9]+\.[0-9]+)$") +VERSION_RE = re.compile(r"^v?(?P[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9a-zA-Z.]+)?)$") def write_output(name: str, value) -> None: @@ -86,28 +86,27 @@ def read_pyproject_name() -> str: def read_changelog(version: str) -> str: content = (ROOT / "README.md").read_text(encoding="utf-8") - heading = f"### {version}" - match = re.search( - rf"^{re.escape(heading)}\s*\n(?P.*?)(?=^### \S|\Z)", - content, - flags=re.MULTILINE | re.DOTALL, - ) + base_version = version.split("-")[0] + for v in [version, base_version]: + heading = f"### {v}" + match = re.search( + rf"^{re.escape(heading)}\s*\n(?P.*?)(?=^### \S|\Z)", + content, + flags=re.MULTILINE | re.DOTALL, + ) + if match: + body = match.group("body").strip() + if body: + return body + "\n" - if not match: - raise RuntimeError(f"Could not find changelog section {heading!r} in README.md") - - body = match.group("body").strip() - if not body: - raise RuntimeError(f"Changelog section {heading!r} is empty") - - return body + "\n" + raise RuntimeError(f"Could not find changelog section '### {version}' or '### {base_version}' in README.md") def normalize_tag(tag: str) -> Tuple[str, str]: match = VERSION_RE.match(tag) if not match: raise RuntimeError( - f"Release tag {tag!r} is not supported. Use a plain version tag like 2.1.1 or v2.1.1." + f"Release tag {tag!r} is not supported. Use a version tag like 2.1.1, v2.1.1, or 2.1.1-rc1." ) return tag, match.group("version") @@ -115,6 +114,7 @@ def normalize_tag(tag: str) -> Tuple[str, str]: def expected_python_assets(version: str) -> Set[str]: package = "hyfetch" + py_ver = re.sub(r"-(rc|alpha|beta|dev)", r"\1", version) platforms = [ "any", "win_amd64", @@ -126,8 +126,8 @@ def expected_python_assets(version: str) -> Set[str]: "macosx_11_0_arm64", ] - assets = {f"{package}-{version}.tar.gz"} - assets.update(f"{package}-{version}-py3-none-{platform}.whl" for platform in platforms) + assets = {f"{package}-{py_ver}.tar.gz"} + assets.update(f"{package}-{py_ver}-py3-none-{platform}.whl" for platform in platforms) return assets