From 8d2b767b7aa98a0671ffd8dd2031f2ac4e2dd470 Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Wed, 12 Aug 2026 21:37:54 +0200 Subject: [PATCH 1/2] fix(build): point make lint at the project's own PHPCS standard The lint and lint-fix targets ran --standard=WordPress, which CLAUDE.md explicitly warns against: this codebase is deliberately PSR-style, so that ruleset reports filenames, brace placement and indentation as errors on every file. `make lint` therefore always failed. Because `make release` chains lint test svn-sync svn-push svn-tag, it could never reach the sync step. The 1.1.0 release had to be run one target at a time. Both targets now use the repo's phpcs.xml.dist, the standard CLAUDE.md documents, which passes clean on 38 files. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f4e0cf9..78ec2ab 100644 --- a/Makefile +++ b/Makefile @@ -22,12 +22,12 @@ install: ## Install all Composer dependencies (dev + prod) composer install --prefer-dist .PHONY: lint -lint: ## Run PHPCS (WordPress coding standards) - php -d xdebug.mode=off vendor/bin/phpcs --standard=WordPress src/ owlstack.php +lint: ## Run PHPCS (project standard from phpcs.xml.dist) + php -d xdebug.mode=off vendor/bin/phpcs .PHONY: lint-fix lint-fix: ## Auto-fix PHPCS violations where possible - php -d xdebug.mode=off vendor/bin/phpcbf --standard=WordPress src/ owlstack.php + php -d xdebug.mode=off vendor/bin/phpcbf .PHONY: test test: ## Run PHPUnit tests From cd9fc9edac43a8f2af47152bb1877ad7f5c80ccf Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Thu, 13 Aug 2026 15:20:05 +0200 Subject: [PATCH 2/2] fix(build): commit trunk and the release tag in one SVN revision svn-tag did a server-side copy of the remote trunk, so it could only run after svn-push had already committed trunk. That left a window where trunk advertised a Stable tag whose directory did not exist yet: WordPress.org read trunk on commit, failed to resolve the tag, and kept serving the previous version. The 1.1.0 release sat unpublished for a day because of it. svn-tag now stages tags/VERSION as a local copy of the working copy trunk and svn-push commits trunk and the tag together, so the tag is always present the moment the directory reads Stable tag. Guards refuse to re-tag an existing version or to push an unstaged tag. --- Makefile | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 78ec2ab..dbeaffd 100644 --- a/Makefile +++ b/Makefile @@ -149,23 +149,35 @@ svn-diff: ## Preview SVN changes before committing @echo "==> SVN diff (summary):" cd $(SVN_DIR) && svn diff --summarize +# Tag and trunk must land in ONE revision: WordPress.org reads trunk's Stable tag +# on commit and keeps the previous version if that tag does not exist yet. +.PHONY: svn-tag +svn-tag: ## Stage tags/VERSION as a local copy of trunk (svn-push commits it) + @if [ ! -d "$(SVN_DIR)/trunk" ]; then \ + echo "Error: No SVN working copy. Run 'make svn-checkout' first."; \ + exit 1; \ + fi + @if [ -d "$(SVN_DIR)/tags/$(VERSION)" ]; then \ + echo "Error: tags/$(VERSION) already exists. Bump the version first."; \ + exit 1; \ + fi + @echo "==> Staging tag $(VERSION) from trunk…" + cd $(SVN_DIR) && svn copy trunk tags/$(VERSION) + @echo "==> Tag staged. Run 'make svn-push' to commit it together with trunk." + .PHONY: svn-push -svn-push: ## Commit SVN trunk to WordPress.org +svn-push: ## Commit trunk and the staged tag to WordPress.org in one revision @if [ ! -d "$(SVN_DIR)/trunk" ]; then \ echo "Error: No SVN working copy. Run 'make svn-checkout' first."; \ exit 1; \ fi - @echo "==> Committing trunk v$(VERSION) to WordPress.org…" + @if [ ! -d "$(SVN_DIR)/tags/$(VERSION)" ]; then \ + echo "Error: tags/$(VERSION) is not staged. Run 'make svn-tag' first."; \ + exit 1; \ + fi + @echo "==> Committing v$(VERSION) to WordPress.org…" cd $(SVN_DIR) && svn commit --username $(SVN_USER) -m "Release $(VERSION)" - @echo "==> Trunk committed." - -.PHONY: svn-tag -svn-tag: ## Create SVN tag from trunk (copies remote, fast) - @echo "==> Tagging v$(VERSION) on WordPress.org…" - svn copy $(SVN_URL)/trunk $(SVN_URL)/tags/$(VERSION) \ - --username $(SVN_USER) \ - -m "Tagging version $(VERSION)" - @echo "==> Tag $(VERSION) created. Plugin update will be live shortly." + @echo "==> trunk and tags/$(VERSION) committed in a single revision." .PHONY: svn-assets svn-assets: ## Sync assets/ to SVN assets branch (banners, icons, screenshots) @@ -189,7 +201,7 @@ svn-assets: ## Sync assets/ to SVN assets branch (banners, icons, screenshots) @echo "==> Assets updated on WordPress.org." .PHONY: release -release: lint test svn-sync svn-push svn-tag ## Full release: lint → test → sync → push → tag +release: lint test svn-sync svn-tag svn-push ## Full release: lint → test → sync → tag → push @echo "" @echo "==> 🎉 $(PLUGIN_SLUG) v$(VERSION) released to WordPress.org!" @echo " https://wordpress.org/plugins/$(PLUGIN_SLUG)/"