Skip to content

chore: share one version sync script across plugins - #844

Merged
josephfusco merged 2 commits into
mainfrom
chore/shared-version-sync
Oct 26, 2026
Merged

josephfusco merged 2 commits into
mainfrom
chore/shared-version-sync

Conversation

@josephfusco

Copy link
Copy Markdown
Member

Replaces the five bin/sync-package-version.sh copies with one scripts/sync-plugin-version.sh.

Why

The copies were identical except for two lines: the main plugin file name and the version constant (for example hwp-previews.php and HWP_PREVIEWS_VERSION). Both follow from the plugin folder name, the same convention every plugin already uses. The shared script works them out from the folder, so a new plugin needs no copy.

How it's wired

  • Each plugin's "version" npm script now points to ../../scripts/sync-plugin-version.sh. It runs from the plugin folder, the same as before. You can also pass a plugin folder as the first argument.
  • The release-please sync job still calls npm run version in the plugin folder, so it doesn't change.
  • Nothing is generated or copied, and bin/ was already left out of the plugin zips.

Testing

  • For each of the five plugins, set package.json to 9.9.9 in two scratch copies, then ran the old per-plugin script on one and the new shared script on the other. The resulting composer.json, readme.txt, and main plugin file are byte-identical. Each main file has both the header Version and the constant bumped.
  • npm run version in hwp-previews runs the new script and leaves the files unchanged when the version hasn't changed.
Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with consolidating the per-plugin version scripts and checking that the result is identical.

The five bin/sync-package-version.sh copies differed only in the plugin file name and
version constant, which both follow from the plugin folder name. Each plugin's
`npm run version` now runs scripts/sync-plugin-version.sh, which works them out.
@josephfusco josephfusco added the [Type] Task Maintenance, upkeep, and other non-functional work label Oct 24, 2026
@josephfusco josephfusco added the [Area] Infrastructure Issues for the repository infrastructure label Oct 24, 2026
@josephfusco
josephfusco requested review from a team and colinmurphy as code owners October 24, 2026 02:17
@josephfusco josephfusco added [Type] Task Maintenance, upkeep, and other non-functional work [Area] Infrastructure Issues for the repository infrastructure labels Oct 24, 2026
@changeset-bot

changeset-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8e2f593

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

📦 Plugin Artifacts Ready!

Download from GitHub Actions run

Available plugins:

  • ✅ hwp-documents.zip
  • ✅ hwp-previews.zip
  • ✅ wpgraphql-debug-extensions.zip
  • ✅ wpgraphql-logging.zip
  • ✅ wpgraphql-webhooks.zip

See the "Artifacts" section at the bottom of the Actions run page

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🔍 WordPress Plugin Check Report

❌ Status: Failed

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
1 1 0

❌ Errors (1)

📁 readme.txt (1 error)
📍 Line 🔖 Check 💬 Message
0 outdated_tested_upto_header Tested up to: 6.9 < 7.1. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@josephfusco
josephfusco merged commit d5d83bd into main Oct 26, 2026
12 of 17 checks passed
@josephfusco
josephfusco deleted the chore/shared-version-sync branch October 26, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Infrastructure Issues for the repository infrastructure [Type] Task Maintenance, upkeep, and other non-functional work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant