Skip to content

Sync GatherPress Alpha version + SECURITY.md tables on version generate#4

Open
mauteri wants to merge 3 commits into
mainfrom
feature/sync-alpha-version-and-security
Open

Sync GatherPress Alpha version + SECURITY.md tables on version generate#4
mauteri wants to merge 3 commits into
mainfrom
feature/sync-alpha-version-and-security

Conversation

@mauteri

@mauteri mauteri commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Folds two steps into the existing generate_version WP-CLI command so one version bump propagates everywhere, instead of editing these by hand:

  1. GatherPress Alpha version sync — sets gatherpress-alpha/gatherpress-alpha.php's Version: header to match core (lockstep companion). Alpha's path is derived as a sibling of GATHERPRESS_CORE_PATH (../gatherpress-alpha).
  2. SECURITY.md refresh — rewrites the Supported Versions table in both gatherpress and gatherpress-alpha to:
    | <major.minor>.x | :white_check_mark: |
    | < <major.minor> | :x:                |
    
    The major.minor is derived from the full version with any -alpha/-beta/-rc suffix stripped (e.g. 0.34.0-beta.10.34).

Source of truth is the core version (GATHERPRESS_VERSION / gatherpress.php), same as the existing command. No package.json version on alpha, so nothing to do there.

Behavior notes

  • If the Alpha plugin or a SECURITY.md isn't present alongside core, it warns and skips (doesn't fail the whole command).
  • Matches existing code style (same Version: regex, WP_CLI::success/error, path constants).

Tested

  • php -l clean.
  • Regexes verified against the real SECURITY.md table and alpha version header: produce 0.34.x / < 0.34 and bump alpha to 0.34.0-beta.1 correctly.

🤖 Generated with Claude Code

mauteri and others added 3 commits May 30, 2026 10:58
Extends the generate_version WP-CLI command so a single version bump also:
- Sets the GatherPress Alpha plugin header version to match core (lockstep
  companion; sibling dir derived from GATHERPRESS_CORE_PATH).
- Refreshes the Supported Versions table in both core and alpha SECURITY.md
  to '<major.minor>.x' supported / '< <major.minor>' unsupported, with any
  -alpha/-beta/-rc suffix stripped.

Missing alpha plugin / SECURITY.md files warn and skip rather than fail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the in-place SECURITY.md edit with a generated approach, matching how
README.md / readme.txt are built from parts/:
- New parts/shared/security.md template with a {{SUPPORTED_VERSIONS_TABLE}} token.
- generate_security() injects the table for the current major.minor (X.Y.x
  supported, < X.Y not) and writes the full doc to core + alpha SECURITY.md.

Alpha version-header sync stays an in-place edit (it's a plugin header, not a doc).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove the Supported Versions section from gatherpress-develop's own
  SECURITY.md (internal tooling, no version-support matrix needed).
- Add 'supernovia' to the gatherpress-team for 0.34.0-beta.1 in data/credits.php.
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