Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ npm run release # Bump version via commit-and-tag-version (updates plugin.php
npm run zip # Package plugin as .zip for distribution
```

`npm run release` uses `wp-plugin-version-updater.js` to keep the version string in the `plugin.php` header in sync alongside the standard `package.json` bump.
`npm run release` uses the `@ucsantacruz/wordpress-version-updater` dev dependency as the
`plugin.php` bump-file updater, which keeps the `Version:` header in sync with the
`package.json` bump. A `prerelease` hook runs `wordpress-version-updater check plugin.php`
first, so the release stops before any bump if the header cannot be parsed.

## Architecture

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ them there, keeping them under version control.

`npm run release` uses [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version)
to bump `package.json`, `package-lock.json`, and the `Version:` header in `plugin.php`
(through `wp-plugin-version-updater.js`), and to update `CHANGELOG.md` from the commit
(through the
[`@ucsantacruz/wordpress-version-updater`](https://www.npmjs.com/package/@ucsantacruz/wordpress-version-updater)
package), and to update `CHANGELOG.md` from the commit
history. Push the resulting `v*.*.*` tag and
[.github/workflows/release.yml](.github/workflows/release.yml) builds the zip and
publishes the GitHub release via the shared `ucsc/actions` workflow.
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"packages-update": "wp-scripts packages-update"
},
"devDependencies": {
"@ucsantacruz/wordpress-version-updater": "^2.0.0",
"@wordpress/scripts": "^30.23.0",
"commit-and-tag-version": "^12.0.0"
},
Expand All @@ -37,18 +38,21 @@
"LICENSE"
],
"commit-and-tag-version": {
"scripts": {
"prerelease": "wordpress-version-updater check plugin.php"
},
"bumpFiles": [
{
"filename": "plugin.php",
"updater": "node_modules/@ucsantacruz/wordpress-version-updater/index.js"
},
{
"filename": "package-lock.json",
"type": "json"
},
{
"filename": "package.json",
"type": "json"
},
{
"filename": "plugin.php",
"updater": "wp-plugin-version-updater.js"
}
]
}
Expand Down
11 changes: 0 additions & 11 deletions wp-plugin-version-updater.js

This file was deleted.

Loading