diff --git a/scripts/verify-changelog-sync.sh b/scripts/verify-changelog-sync.sh index 012f12d..4d864c8 100755 --- a/scripts/verify-changelog-sync.sh +++ b/scripts/verify-changelog-sync.sh @@ -19,7 +19,12 @@ TAG="v$VER" grep -qE "^[[:space:]]*\*\*v${VER}[^0-9]" "$YAML" \ || fail "$YAML changelog missing **v${VER}** subblock. Fix: add the v${VER} block at the top of the changelog field." -jq -r '.[0].Changelog' "$REPO_JSON" | grep -qE "^[[:space:]]*\*\*v${VER}[^0-9]" \ +# Process substitution instead of `jq | grep -q` — grep -q closes stdin on the +# first match, jq keeps writing the multi-KB Changelog string and trips SIGPIPE, +# which `set -o pipefail` then turns into a false-positive FAIL. Manifested as a +# `jq: writing output failed: Broken pipe` line plus a misleading "Changelog +# missing **vX.Y.Z** subblock" message during pre-push runs. +grep -qE "^[[:space:]]*\*\*v${VER}[^0-9]" <(jq -r '.[0].Changelog' "$REPO_JSON") \ || fail "$REPO_JSON Changelog missing **v${VER}** subblock. Fix: copy the yaml changelog over." FORGE_FILE="$FORGE_DIR/${TAG}.md"