- SC2155 (bin/localwp-setup.sh): declare local variables separately from
command substitution assignments to avoid masking return values (13 fixes)
- SC2034 (bin/localwp-setup.sh): remove unused PLUGIN_TEXT_DOMAIN variable
- SC2162 (bin/localwp-setup.sh): add -r flag to read to avoid backslash mangling
- SC2154 (bin/setup-test-env.sh): add shellcheck disable for PHP variables in
heredoc that ShellCheck incorrectly identifies as unassigned shell variables
- bin/setup-test-env.sh: remove self-modifying chmod +x $0 (unnecessary and
bad practice; file permissions should be set once in version control)
- bin/setup-test-env.sh: change == to = in POSIX [ ] test expressions
- build.sh: add ./ prefix to directory glob copies for clarity
- build.sh: use subshell (cd build || exit 1; zip ...) instead of bare cd/cd..
to avoid SC2103 and ensure working directory is always restored
Fixes part of #20 (shell script quality issues)
Adds PYTHON_PID variable and cleanup() function with EXIT/INT/TERM trap
to ensure the background Python HTTP server is always stopped when the
script exits, whether normally or due to an unexpected interruption.
Applies to both playground-single and playground-multisite branches.
Closes#30
* fix: address PR #15 review feedback in bin/install-wp-tests.sh
- Harden download(): use curl -fsSL/-o, wget -qO, add else branch for
missing curl/wget (HIGH finding from coderabbit)
- Fix beta/RC version logic: set WP_TESTS_TAG='branches/$WP_BRANCH' so
the computed tag is not silently discarded (MEDIUM finding)
- Use --branch "$WP_TESTS_TAG" in git clone so the correct WP version
is checked out instead of always pulling master (MEDIUM finding)
- Add failure checks (if ! cmd) after git clone and cp operations in
install_test_suite (MEDIUM finding)
- Quote $ioption in all sed calls to prevent word splitting
- Replace sed trailing-slash strip with ${WP_CORE_DIR%/} (SC2001)
- Quote ${SKIP_DB_CREATE} and $EXTRA to prevent word splitting (SC2086)
- Suppress SC2001 for VERSION_ESCAPED sed (regex dot-escaping requires sed)
- ShellCheck: zero violations
Closes#29
* fix: strip SVN prefix from WP_TESTS_TAG for git clone --branch
WP_TESTS_TAG uses SVN-style paths (tags/X.Y.Z, branches/X.Y, trunk)
but git clone --branch requires bare ref names (X.Y.Z, X.Y, trunk).
Derive GIT_REF by stripping the tags/ or branches/ prefix before
passing to git clone. Also remove the no-op grep line in the latest
version lookup and add head -1 to guard against multiple matches.
Fixes CI failure: 'fatal: Remote branch tags/6.9.4 not found'
Closes#29
- Update @wp-playground/cli to v3.0.22 (from deprecated v1.0.28)
- Add bin/playground-test.sh for AI assistant CLI testing
- Add bin/localwp-setup.sh for LocalWP integration
- Create .agents/local-testing-guide.md documentation
- Update blueprints to use new installPlugin step format
- Add npm scripts for playground:start/stop/status
- Add npm scripts for localwp:create/sync/reset
- Update GitHub Actions to use new CLI version
- Use PHP 8.0 and latest WordPress in blueprints
- Add verbose logging to install-wp-tests.sh step
- Make mysqladmin create non-fatal (database may already exist)
- Add echo statements to track installation progress
This helps diagnose the "Install WordPress test suite" failure
and prevents failures when database already exists.
🤖 Generated with [Qoder][https://qoder.com]