fix(release): normalize Windows checksum manifests

This commit is contained in:
Peter Steinberger
2026-07-14 00:20:59 +01:00
parent 34c63c3c3a
commit 4fdb314d9a
2 changed files with 8 additions and 3 deletions

View File

@@ -619,15 +619,18 @@ jobs:
(
cd "$recovery_dir"
verify_checksum_manifest() {
local manifest="$1" actual expected
local manifest="$1" actual expected normalized
shift
normalized="${manifest}.normalized"
sed 's/\r$//' "$manifest" > "$normalized"
expected="$(printf '%s\n' "$@" | LC_ALL=C sort)"
actual="$(awk 'NF { name=$2; sub(/^\*/, "", name); print name }' "$manifest" | LC_ALL=C sort)"
actual="$(awk 'NF { name=$2; sub(/^\*/, "", name); print name }' "$normalized" | LC_ALL=C sort)"
if [[ "$actual" != "$expected" ]]; then
echo "$manifest must list exactly: $*" >&2
exit 1
fi
sha256sum --strict --check "$manifest"
sha256sum --strict --check "$normalized"
rm -f "$normalized"
}
verify_checksum_manifest OpenClaw-Android-SHA256SUMS.txt \
OpenClaw-Android.apk

View File

@@ -508,6 +508,8 @@ describe("package acceptance workflow", () => {
expect(workflow).toContain("actual=\"$(awk 'NF { name=$2;");
expect(workflow).toContain('sub(/^\\*/, "", name)');
expect(workflow).not.toContain('sub(/^\\\\*/, "", name)');
expect(workflow).toContain('sed \'s/\\r$//\' "$manifest" > "$normalized"');
expect(workflow).toContain('sha256sum --strict --check "$normalized"');
expect(workflow).toContain(
"Windows Node Release must contain one successful signed-installer promotion job.",
);