Skip to content

Release script: check Tested up to against the current WordPress release - #3179

Open
tellyworth wants to merge 1 commit into
trunkfrom
update/release-tested-up-to-check
Open

tellyworth wants to merge 1 commit into
trunkfrom
update/release-tested-up-to-check

Conversation

@tellyworth

@tellyworth tellyworth commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Changes Proposed in this Pull Request

make release printed the plugin's Tested up to value but never checked it, so keeping it current depended on someone remembering. This makes the release script check it.

  • Before the confirmation prompt, the script gets the current WordPress version from api.wordpress.org and compares it with Tested up to in the main plugin file and in readme.txt.
  • If either is behind, or the two disagree, it prints what it found and asks whether the plugin has been tested on that WordPress version. Yes sets both headers to that major.minor version in the release commit, and the confirmation screen shows the new value.
  • On no, it asks whether to release without changing Tested up to. Yes carries on as before. No stops before any branch or file is touched.
  • Both prompts default to no, so the header is never raised without a yes. When the headers agree and are current, nothing new is asked. If wordpress.org can't be reached, the script warns that the check was skipped and carries on.
  • The comparison and header helpers are in a new scripts/tested-up-to.mjs, which reads the file paths from release.config.json like the rest of the script.

Testing Instructions

Tested in a scratch clone with the push URL pointed at a path that doesn't exist, so nothing could reach GitHub:

  • Headers as on trunk (both 7.1): node scripts/prepare-release.mjs 9.9.9 asks nothing new. Answer no at "Proceed with release preparation?".
  • With Tested up to: 6.9 committed to readme.txt:
    • Answer yes: the confirmation shows Tested up to: 7.1 (set in the plugin header and the readme by this release). Continuing writes Tested up to: 7.1 and the new version to readme.txt in the release commit, then the push fails as intended.
    • Answer no, then yes: the confirmation shows the current value and the release carries on unchanged.
    • Answer no, then no: the script exits with no branch and no changes.
  • Helper functions checked with assertions, including 6.10 against 6.9 and a missing header.

Not tested: the wordpress.org failure path against a real outage. Any fetch or parse error returns an empty version, which the script treats as "skip the check".

Answers piped on stdin may not reach the second prompt, so a release with out-of-date headers is best run in a terminal. If the input runs out, the script stops at the prompt without changing anything.

Release Notes


Plugin build for cb3ed31
📦 Download plugin zip
▶️ Open in playground

When the plugin's Tested up to headers are behind the current WordPress
release, or the plugin header and readme.txt disagree, the script now says so
and asks whether the plugin was tested on that version. Yes sets both headers
in the release commit. No asks whether to release anyway, and a second no
stops before anything is changed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant