Skip to content

Release tooling: bump and verify WP_ULTIMO_VERSION, and flag guessed @since tags #2143

Open

Description

@superdav42

What

Close two gaps in the release tooling that the 2.20.0 release had to work around by hand:

  1. Bump and verify define('WP_ULTIMO_VERSION', ...) in ultimate-multisite.php, the one release version location the tooling misses.
  2. Flag guessed numeric @since / @deprecated tags 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, function update_versions() (around lines 121-126): add a sed -i.bak -E line next to the header and class-constant updates that rewrites the define('WP_ULTIMO_VERSION', '...') line in ultimate-multisite.php, and add ultimate-multisite.php.bak handling consistent with the existing cleanup line. Pattern to copy: the const VERSION rewrite for inc/class-wp-ultimo.php. The expression used by hand for 2.20.0 was sed -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 with grep -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 existing CLASS_VERSION handling in the same step.
  • bin/replace-next-version.sh: add a --check-guessed [<base-ref>] mode (base defaults to the latest v* tag). It lists @since / @deprecated tags on lines added since the base, in the same tracked PHP and JS files and with the same exclusions as PATHSPECS, 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.Z option (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, before update_versions(), as a warning that lists the offending lines.
  • CONTRIBUTING.md, "Release Process" step 1: list every version location (including WP_ULTIMO_VERSION) and mention the new check, so manual release PRs and bin/deploy.sh stay in sync.

Files Scope

  • bin/deploy.sh
  • bin/replace-next-version.sh
  • .github/workflows/release.yml
  • CONTRIBUTING.md

Acceptance

  • bin/deploy.sh <version> rewrites only the WP_ULTIMO_VERSION line of ultimate-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.0 reports exactly the 14 guessed tags named above and nothing else, and exits 1.
  • At tag v2.20.0 with base v2.19.0 it 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:

  1. Apply the new sed expression to a scratch copy of ultimate-multisite.php and confirm a diff against the original shows only the define line changed.
  2. 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).
  3. Run the two --check-guessed scenarios from Acceptance in scratch worktrees.
  4. bash -n on 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

  1. added
    bug
    on Nov 21, 2026
  2. locked as resolved and limited conversation to collaborators on Nov 21, 2026
  3. added
    status:available
    origin:interactive
    infrastructure
    tier:standard
    on Nov 21, 2026
  4. changed the title [-]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[/+] on Nov 21, 2026
  5. superdav42 commented on Nov 21, 2026

    @superdav42
    CollaboratorAuthor

    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

  6. superdav42 commented on Nov 21, 2026

    @superdav42
    CollaboratorAuthor

    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

  7. added
    status:queued
    status:in-progress
    and removed
    status:available
    status:queued
    on Nov 21, 2026
  8. superdav42 commented on Nov 21, 2026

    @superdav42
    CollaboratorAuthor

    Dispatching worker (deterministic).

  9. superdav42 commented on Nov 21, 2026

    @superdav42
    CollaboratorAuthor

    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.

  10. added
    status:in-review
    and removed
    status:in-progress
    on Nov 21, 2026
  11. superdav42 commented on Nov 21, 2026

    @superdav42
    CollaboratorAuthor

    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

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

Metadata

Metadata

Assignees

Labels

auto-dispatchbuginfrastructureorigin:interactivestatus:in-reviewtier:standard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions