fix(scripts): POSIX [[:space:]] for BSD sed — macOS compatibility - #2
Open
adityaarsharma wants to merge 1 commit into
Open
fix(scripts): POSIX [[:space:]] for BSD sed — macOS compatibility#2adityaarsharma wants to merge 1 commit into
adityaarsharma wants to merge 1 commit into
Conversation
13 release-gate scripts × 47 lines patched. Replaces GNU `\s` shorthand inside `sed -E` commands with the POSIX `[[:space:]]` bracket expression so the gauntlet runs on macOS without silent failures. The most user-visible bug this fixed: `check-version-parity.sh` returning the full "## 3.0.0 — 2026-05-11" string as CHANGELOG_VER because BSD sed silently kept the leading "## " and trailing date. Result: every Mac user saw a false-positive "Mismatch" FAIL on otherwise correct plugins. Also tightens `check-pot-file.sh` JS i18n scan with `--exclude=*.min.js` so minified vendor bundles (Chart.js, etc.) don't trigger false wp.i18n positives. The original regex matched bare `_n(` and `_x(` which collide with minified function names like `_x(t,e)`. Scripts touched: check-license.sh (1 line) check-modern-wp.sh (1 line) check-ownership-transfer.sh (5 lines) check-php-compat.sh (1 line) check-plugin-header.sh (4 lines) check-pot-file.sh (2 lines + vendor exclude) check-readme-txt.sh (3 lines) check-rtl-readiness.sh (1 line) check-version-parity.sh (3 lines) check-wp-compat.sh (1 line) check-wp-org-guidelines.sh (1 line) generate-design-md.sh (16 lines) scaffold-tests.sh (5 lines) Verified by running the full pre-release gauntlet on a real WordPress plugin (EDD Reports 3.0.0) on macOS Sonnet/BSD sed. All gates pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
13 release-gate scripts × 47 lines patched. Replaces GNU
\sshorthand insidesed -Ecommands with the POSIX[[:space:]]bracket expression so the gauntlet runs on macOS without silent failures.Why
The most user-visible bug:
check-version-parity.shreturning the full"## 3.0.0 — 2026-05-11"string asCHANGELOG_VERbecause BSD sed silently keeps the leading##and trailing date. Result: every macOS user got a false-positiveMismatchFAIL on otherwise correct plugins.Several other scripts (
check-plugin-header.sh,check-readme-txt.sh,check-pot-file.sh, etc.) had the same issue in theirsedextractions for version/header parsing.Also fixed
Tightened
check-pot-file.shJS i18n scan with--exclude=*.min.jsso minified vendor bundles (Chart.js, etc.) don't trigger falsewp.i18npositives. The original regex matched bare_n(and_x(which collide with minified function names like_x(t,e).Scripts touched
check-license.shcheck-modern-wp.shcheck-ownership-transfer.shcheck-php-compat.shcheck-plugin-header.shcheck-pot-file.shcheck-readme-txt.shcheck-rtl-readiness.shcheck-version-parity.shcheck-wp-compat.shcheck-wp-org-guidelines.shgenerate-design-md.shscaffold-tests.shTest plan
sed-context\sreplaced[[:space:]]is POSIX, identical semantics on bothgrep -Ecalls untouched (BSD grep already accepts\s)Backward compatibility
Zero.
[[:space:]]and\sare semantically identical for whitespace matching; this is purely a portability change.🤖 Generated with Claude Code