Repository navigation
chore: share one version sync script across plugins - #844
Open
josephfusco wants to merge 1 commit into
Open
josephfusco wants to merge 1 commit into
josephfusco wants to merge 1 commit into
Conversation
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.
|
Contributor
📦 Plugin Artifacts Ready!Download from GitHub Actions run Available plugins:
See the "Artifacts" section at the bottom of the Actions run page |
Contributor
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (34)📁 examples/wpgraphql-logging-nextjs/wp-env/uploads.zip (1 error)
📁 examples/wpgraphql-logging-nextjs/wp-env/setup/.htaccess (1 error)
📁 examples/wpgraphql-logging-nextjs/.wp-env.json (1 error)
📁 .env.dist (2 errors)
📁 .docker/.env.ci (1 error)
📁 assets/.gitkeep (1 error)
📁 .editorconfig (1 error)
📁 wp-env/setup/.htaccess (1 error)
📁 .wp-env.json (1 error)
📁 src/Logger/.gitkeep (1 error)
📁 phpstan.neon.dist (1 error)
📁 bin/build-docker.sh (1 error)
📁 bin/_lib.sh (1 error)
📁 bin/run-codeception.sh (1 error)
📁 bin/install-plugins.sh (1 error)
📁 bin/install-test-env.sh (1 error)
📁 bin/local/run-e2e-tests.sh (1 error)
📁 bin/local/setup-docker-env.sh (1 error)
📁 bin/local/run-qa.sh (1 error)
📁 bin/local/run-unit-tests.sh (1 error)
📁 .docker/init-docker.sh (1 error)
📁 examples/wpgraphql-logging-nextjs/example-app/src/pages/[slug].js (1 error)
📁 wpgraphql-logging.php (2 errors)
📁 src/Admin/View/Download/DownloadLogService.php (1 error)
📁 readme.txt (2 errors)
📁 activation.php (1 error)
📁 deactivation.php (1 error)
📁 src/Admin/View/Templates/WPGraphQLLoggerView.php (1 error)
📁 src/Admin/View/Templates/WPGraphQLLoggerNotice.php (1 error)
📁 src/Admin/View/List/ListTable.php (1 error)
📁 src/Admin/Settings/Templates/admin.php (1 error)
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the five
bin/sync-package-version.shcopies with onescripts/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.phpandHWP_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
"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.npm run versionin the plugin folder, so it doesn't change.bin/was already left out of the plugin zips.Testing
package.jsonto 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 resultingcomposer.json,readme.txt, and main plugin file are byte-identical. Each main file has both the headerVersionand the constant bumped.npm run versionin 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.