Commit 446a1a1
authored
Local dev environment, lint tooling, and manual release pipeline (#1035)
* Add Makefile and wp-env-based local dev environment
- Makefile with install/up/down/destroy/logs/cli/wp/seed/unseed/lint targets.
- .wp-env.json spins up a disposable WordPress on http://localhost:8888 with
the plugin live-mounted.
- tests/dev/seed.php creates 100 randomly named posts and 100 pages tagged
with _wpsc_seed meta; tests/dev/unseed.php removes only those.
- tests/dev/mu-plugins/wpsc-loopback-fix.php rewrites loopback HTTP requests
from http://localhost:8888 to the internal docker service, preserving the
Host header so WordPress does not canonical-redirect. Needed so the
preloader, WP-Cron and REST self-calls work from inside the containers.
- README documents the new workflow.
* Add linting commands expected by Makefile
* Fix PHPCS errors in dev seed/unseed scripts
Add @Package tags, replace fwrite/printf with WP_CLI methods, rename
loop variables that overrode WordPress globals, and gate the scripts
on WP_CLI instead of ABSPATH so output is properly escaped.
* Add phpcs-changed wrapper scripts and wire up lint commands
Add tools/ wrapper scripts so PHPCS only inspects changed hunks,
expose them via composer scripts and the Makefile, and document the
lint workflow in the README.
* Auto install @wordpress/env
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* cli target opens shell in the cli container
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix to `make cli` docs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove unused code from this file
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed link to changelog
* Add pre-build and build Make targets for releases
Replace the jetpack-changelogger release flow with two local scripts:
- scripts/pre-build.sh bumps the version in readme.txt and wp-cache.php,
generates a PR list for the last six months via `gh pr list`, opens
readme.txt and the log in vim for manual changelog editing, then
pushes a release/<version> branch and opens a PR.
- scripts/build-plugin.sh rsyncs the plugin into build/wp-super-cache/
and zips it using scripts/exclude.lst (shared by rsync and zip).
Remove CHANGELOG.md since readme.txt is now the single source of truth.
Ignore the build/ directory.
* Review follow-up: fix dead changelog link, bash portability, sed backups
- readme.txt: CHANGELOG.md link replaced with GitHub releases URL.
- Makefile: set SHELL := /bin/bash so `read -p` works on Linux hosts
where /bin/sh is dash.
- scripts/pre-build.sh: use `sed -i ''` directly instead of `-i.bak && rm`
so an interrupted run can't leave `.bak` files behind.
* Untrack root package-lock.json
* Remove Jetpack release automation in favour of local scripts
Delete the workflows and helper scripts that implemented the old
Jetpack-driven release pipeline so they do not fight the new manual
`make pre-build` / `make build` / `make publish` flow:
- .github/workflows/autotagger.yml (tag pushes from CHANGELOG.md).
- .github/workflows/autorelease.yml (GitHub release from a tag push).
- .github/workflows/wp-svn-autopublish.yml (WordPress.org SVN publish).
- .github/workflows/changelogger.yml (per-PR changelog entry check).
- .github/files/autorelease.sh and wp-svn-autopublish.sh helpers.
Add `make publish` via scripts/publish.sh: creates a GitHub release
from readme.txt + build/wp-super-cache.zip, then optionally publishes
to WordPress.org SVN (shallow checkout under build/svn, rsync into
trunk, svn cp to tags/<version>).
* Drop Jetpack release config and jetpack-changelogger dependency
Remove the composer `extra` keys that drove the deleted release
workflows (autorelease, autotagger, wp-svn-autopublish, changelogger
link-template, release-branch-prefix) and drop automattic/jetpack-
changelogger from require-dev. Keep the changelog/ entries for the
next release; they can be removed afterwards.
composer.lock is now stale — run `composer update --lock` to refresh.
* Refresh composer.lock content-hash after extras cleanup
* Document release pipeline in README
* Release 3.0.4
* Revert these, testing mishap
* Add the version and date to the changelog for convenience
* Rename .w.org-assets to w.org-assets and wire into publish.sh
Drop the leading dot to avoid a hidden directory. Update the three
places that referenced the old name (.gitattributes export-ignore,
scripts/exclude.lst) and have publish.sh rsync the directory into
build/svn/assets/ alongside the trunk sync, so banner/icon/blueprint
updates go to WordPress.org with the same `make publish` run.
* Add "trunk" check for publish script
* Address PR review: release + lint script hardening
- pre-build.sh: portable in-place sed (BSD/GNU) and sort -V guard so the
new version must be greater than the current Stable tag.
- build-plugin.sh: enforce trunk / up-to-date / clean working tree, and
prompt to confirm pre-build PR has been merged.
- publish.sh: assert the Stable tag inside the built zip matches
readme.txt, escape dots when matching the changelog section, and
refuse to rsync --delete from an empty build dir.
- run-phpcs-changed.sh: always run the branch-vs-trunk check so
committed hunks are linted even with a dirty working tree.
- Makefile: drop the fake Press RETURN gate; build-plugin.sh now owns it.1 parent 29a906b commit 446a1a1
33 files changed
Lines changed: 839 additions & 1405 deletions
File tree
- .github
- files
- workflows
- scripts
- tests/dev
- mu-plugins
- tools
- w.org-assets
- blueprints
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments