Commit 39b746e74dc for woocommerce
commit 39b746e74dc3be786d64361a4501914f8f0e3b43
Author: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
Date: Fri Oct 9 10:27:33 2026 +0200
Make the changelog append check in the compile workflow pipe-free (#69572)
The auto append check piped sed into grep -Fq under set -o pipefail.
Once the Changelog section is bigger than the pipe buffer, grep exits on
the first match, sed gets SIGPIPE ("sed: couldn't flush stdout: Broken
pipe"), and pipefail turns that into a failed check. The workflow then
runs the changelog tool in replace mode and drops the existing entries
for the version. Read the file with a single awk instead, so there is no
pipe to break.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/.github/workflows/release-compile-changelog.yml b/.github/workflows/release-compile-changelog.yml
index 3ceac362974..07d9985a170 100644
--- a/.github/workflows/release-compile-changelog.yml
+++ b/.github/workflows/release-compile-changelog.yml
@@ -189,7 +189,8 @@ jobs:
if [[ -z "${{ github.event.inputs.append_changelog }}" || "${{ github.event.inputs.append_changelog }}" == "auto" ]]; then
# If a prerelease, append if there's already content in the changelog.
if [[ "$VERSION" == *"-"* || "$VERSION" =~ \.0$ ]]; then
- if sed -n '/== Changelog ==/,$p' release-branch/plugins/woocommerce/readme.txt | grep -Fq '**WooCommerce**'; then
+ # No pipe: under pipefail, grep -q exiting early can SIGPIPE the writer and fail this check.
+ if awk '/== Changelog ==/{f=1} f && index($0, "**WooCommerce**"){found=1; exit} END{exit !found}' release-branch/plugins/woocommerce/readme.txt; then
APPEND_CHANGELOG="--append-changelog"
fi
fi