From 7f2c0f1dfb760670d7d47ed6721f43229f6ac86b Mon Sep 17 00:00:00 2001 From: hector <42570491+majinghe@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:26:41 +0800 Subject: [PATCH] fix(package): write release checksum entries with GitHub asset names (#6234) --- .github/workflows/package.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 95ec5a869..e5851a48d 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -522,10 +522,16 @@ jobs: for f in "$DEB_FILE" "$RPM_FILE"; do if [[ -n "$f" && -f "$f" ]]; then base="$(basename "$f")" - # Remove any stale entry, then append the fresh digest + # GitHub stores release asset names with '~' normalized to '.' + # (e.g. rustfs_1.0.0~rc.2_amd64.deb is stored as + # rustfs_1.0.0.rc.2_amd64.deb), so checksum entries must + # reference the name as stored on the release. + github_base="${base//\~/.}" + # Remove any stale entry (both naming variants), then append grep -Fv -- "$base" "$checksum_file" > "${checksum_file}.tmp" || true - mv "${checksum_file}.tmp" "$checksum_file" - (cd "$(dirname "$f")" && "$checksum_cmd" -- "$base") >> "$checksum_file" + grep -Fv -- "$github_base" "${checksum_file}.tmp" > "${checksum_file}.tmp2" || true + mv "${checksum_file}.tmp2" "$checksum_file" + (cd "$(dirname "$f")" && "$checksum_cmd" -- "$github_base") >> "$checksum_file" fi done