Skip to content

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

Open
josephfusco wants to merge 1 commit into
mainfrom
chore/shared-version-sync
Open

josephfusco wants to merge 1 commit 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

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
34 34 0

❌ Errors (34)

📁 examples/wpgraphql-logging-nextjs/wp-env/uploads.zip (1 error)
📍 Line 🔖 Check 💬 Message
0 compressed_files Compressed files are not permitted.
📁 examples/wpgraphql-logging-nextjs/wp-env/setup/.htaccess (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/wpgraphql-logging-nextjs/.wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .env.dist (2 errors)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
0 application_detected Application files are not permitted.
📁 .docker/.env.ci (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 assets/.gitkeep (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .editorconfig (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 wp-env/setup/.htaccess (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 src/Logger/.gitkeep (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 phpstan.neon.dist (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/build-docker.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/_lib.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/run-codeception.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/install-plugins.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/install-test-env.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-e2e-tests.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/setup-docker-env.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-qa.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-unit-tests.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 .docker/init-docker.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 examples/wpgraphql-logging-nextjs/example-app/src/pages/[slug].js (1 error)
📍 Line 🔖 Check 💬 Message
0 badly_named_files File and folder names must not contain spaces or special characters.
📁 wpgraphql-logging.php (2 errors)
📍 Line 🔖 Check 💬 Message
0 plugin_header_invalid_requires_php The "Requires PHP" header in the plugin file should only contain a PHP version such as "5.2.4" or "7.0".
0 plugin_updater_detected Including An Update Checker / Changing Updates functionality. Plugin Updater detected. Use of the Update URI header is not allowed in plugins hosted on WordPress.org.
📁 src/Admin/View/Download/DownloadLogService.php (1 error)
📍 Line 🔖 Check 💬 Message
65 WordPress.WP.AlternativeFunctions.file_system_operations_fclose File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().
📁 readme.txt (2 errors)
📍 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.
0 readme_mismatched_header_requires_php Mismatched Requires PHP: 8.1.2 != 8.1.2+. "Requires PHP" needs to be exactly the same with that in your main plugin file's header.
📁 activation.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
📁 deactivation.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
📁 src/Admin/View/Templates/WPGraphQLLoggerView.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
📁 src/Admin/View/Templates/WPGraphQLLoggerNotice.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
📁 src/Admin/View/List/ListTable.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
📁 src/Admin/Settings/Templates/admin.php (1 error)
📍 Line 🔖 Check 💬 Message
0 missing_direct_file_access_protection PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

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

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