Repository navigation
Description
What
Close two gaps in the release tooling that the 2.20.0 release had to work around by hand:
- Bump and verify
define('WP_ULTIMO_VERSION', ...)inultimate-multisite.php, the one release version location the tooling misses. - Flag guessed numeric
@since/@deprecatedtags on unreleased code before a release, so they cannot ship.
Why
WP_ULTIMO_VERSION. bin/deploy.sh (update_versions()) updates the plugin header, WP_Ultimo::VERSION, package.json, VERSION and readme.txt, but not WP_ULTIMO_VERSION. The "Verify version matches" step in .github/workflows/release.yml does not compare it either. The release PRs for 2.19.0 (#2123) and 2.20.0 (#2142) updated it by hand. A release cut with bin/deploy.sh would leave it stale and nothing would fail. The constant is read by the site exporter (inc/site-exporter/class-network-exporter.php:634 as exported_by_plugin_version, and inc/site-exporter/class-self-boot-builder.php:179 and :217 as {{PLUGIN_VERSION}}), so a stale value makes exports record the wrong plugin version.
Guessed @since tags. The n.e.x.t placeholder (#2126) only helps code written after it. PRs opened earlier still carried guessed versions: 2.19.0 shipped @since 2.18.1 tags, and the 2.20.0 release PR (#2142) had to correct 14 more by hand (11 x @since 2.19.1 in inc/managers/class-site-manager.php, 3 x @since 2.18.1 in inc/auth/class-passwordless-auth-manager.php). Neither version was ever released, and bin/replace-next-version.sh --check does not see them because they are not placeholders.
How
bin/deploy.sh, functionupdate_versions()(around lines 121-126): add ased -i.bak -Eline next to the header and class-constant updates that rewrites thedefine('WP_ULTIMO_VERSION', '...')line inultimate-multisite.php, and addultimate-multisite.php.bakhandling consistent with the existing cleanup line. Pattern to copy: theconst VERSIONrewrite forinc/class-wp-ultimo.php. The expression used by hand for 2.20.0 wassed -i -E "s/(define\('WP_ULTIMO_VERSION', ')[^']+('\);)/\1$VERSION\2/" ultimate-multisite.php..github/workflows/release.yml, step "Verify version matches" (around lines 61-88): read the define withgrep -oP "define\('WP_ULTIMO_VERSION', '\K[^']+" ultimate-multisite.php, print it with the other versions, and include it in both the pre-release and the stable comparison. Pattern to copy: the existingCLASS_VERSIONhandling in the same step.bin/replace-next-version.sh: add a--check-guessed [<base-ref>]mode (base defaults to the latestv*tag). It lists@since/@deprecatedtags on lines added since the base, in the same tracked PHP and JS files and with the same exclusions asPATHSPECS, whose numeric version is not an existing release tag (git tag -l "v<version>") and is not a version passed with an--allow X.Y.Zoption (the version being released). It exits 1 when it finds any. Existing numeric tags on moved code and intentional corrections to released versions must not be flagged.bin/deploy.sh: run the new check in the prepare phase, beforeupdate_versions(), as a warning that lists the offending lines.CONTRIBUTING.md, "Release Process" step 1: list every version location (includingWP_ULTIMO_VERSION) and mention the new check, so manual release PRs andbin/deploy.shstay in sync.
Files Scope
bin/deploy.shbin/replace-next-version.sh.github/workflows/release.ymlCONTRIBUTING.md
Acceptance
bin/deploy.sh <version>rewrites only theWP_ULTIMO_VERSIONline ofultimate-multisite.php(in addition to what it already updates).- The workflow step fails when the define differs from the tag version, for stable and pre-release tags, and passes when they match.
- In a scratch worktree of commit
1534904f(the base of chore(release): prepare v2.20.0 #2142),bin/replace-next-version.sh --check-guessed v2.19.0reports exactly the 14 guessed tags named above and nothing else, and exits 1. - At tag
v2.20.0with basev2.19.0it reports nothing and exits 0.
Verification
Do not run bin/deploy.sh end to end: it pushes to main, tags and deploys to WordPress.org. Instead:
- Apply the new sed expression to a scratch copy of
ultimate-multisite.phpand confirm a diff against the original shows only the define line changed. - Run the workflow step's shell snippet locally against the tree at tag
v2.20.0(expect a match) and against a copy with a stale define (expect a non-zero exit). - Run the two
--check-guessedscenarios from Acceptance in scratch worktrees. bash -non both scripts, plus ShellCheck if available.
A maintainer should review the workflow change, because it can only be exercised by a real release run.
Context
Found while preparing the 2.20.0 release (PR #2142). An earlier release brief that lists the WP_ULTIMO_VERSION location by hand: #1840.
aidevops.sh v3.39.189 plugin for OpenCode
Activity
[-]Release tooling: bump and verify WP_ULTIMO_VERSION in bin/deploy.sh and release.yml[/-][+]Release tooling: bump and verify WP_ULTIMO_VERSION, and flag guessed @since tags[/+]superdav42 commentedon Nov 21, 2026
DISPATCH_CLAIM nonce=79040978e78617b35e54527fa64292e3 runner=superdav42 ts=2026-11-21T22:29:38Z max_age_s=1800 version=3.39.189 opencode_version=1.18.31 lease_token=79040978e78617b35e54527fa64292e3 device=device-1783824528-2609248-26808 session=issue-2143 phase=prelaunch expires_at=1795300300
superdav42 commentedon Nov 21, 2026
DISPATCH_LEASE phase=prelaunch lease_token=79040978e78617b35e54527fa64292e3 device=device-1783824528-2609248-26808 session=issue-2143 expires_at=1795300646 ts=2026-11-21T22:29:56Z attempt_id=attempt:caa83ebf-8ccd-48d3-95b8-5282eb6319b2
superdav42 commentedon Nov 21, 2026
Dispatching worker (deterministic).
superdav42 commentedon Nov 21, 2026
DISPATCH_LEASE phase=ready lease_token=79040978e78617b35e54527fa64292e3 device=device-1783824528-2609248-26808 session=issue-2143 expires_at=1795307456 ts=2026-11-21T22:30:56Z attempt_id=attempt:caa83ebf-8ccd-48d3-95b8-5282eb6319b2
aidevops.sh v3.39.189 automated scan.
superdav42 commentedon Nov 21, 2026
CLAIM_RELEASED reason=worker_complete runner=superdav42 ts=2026-11-21T22:35:05Z aidevops_version=3.39.189 opencode_version=1.18.31 claim_id=7070220196 nonce=79040978e78617b35e54527fa64292e3 lease_token=79040978e78617b35e54527fa64292e3 device=device-1783824528-2609248-26808 session=issue-2143
aidevops.sh v3.39.189 plugin for OpenCode v1.18.31