Skip to content

Commit 49ef666

Browse files
committed
fix(release): handle ripgrep Windows checksum file format
The Windows .sha256 files use 'SHA256(filename) = hash' format instead of standard 'hash filename'. Use grep -oE to extract the 64-char hex hash directly, which works for both formats.
1 parent 1bd3cfe commit 49ef666

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ jobs:
272272
273273
local expected
274274
local actual
275-
expected=$(awk '{print $1}' "$checksum_file")
275+
expected=$(grep -oE '[a-f0-9]{64}' "$checksum_file" | head -1)
276+
if [ -z "$expected" ]; then
277+
echo "⚠️ Could not parse checksum from $(basename "$checksum_file"), skipping verification"
278+
return 0
279+
fi
276280
actual=$(sha256sum "$archive" | awk '{print $1}')
277281
if [ "$expected" != "$actual" ]; then
278282
echo "❌ Checksum verification failed for $(basename "$archive")" >&2

0 commit comments

Comments
 (0)