Skip to content

Commit e4c7251

Browse files
committed
chore: add sync version
1 parent 3ebf879 commit e4c7251

File tree

5 files changed

+997
-95
lines changed

5 files changed

+997
-95
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "j7-dev/wp-react-plugin",
3-
"version": "1.19.1",
3+
"version": "1.19.2",
44
"description": "This is a boilerplate for creating a WordPress plugin with React, Tailwind, Ant Design, TypeScript, Zod, MSW, React Router v6, React Query v4, SCSS and Vite.",
55
"type": "wordpress-plugin",
66
"license": "GPL-2.0-only",

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wp-react-plugin",
33
"private": true,
4-
"version": "1.19.1",
4+
"version": "1.19.2",
55
"type": "module",
66
"scripts": {
77
"bootstrap": "npm install && composer install --no-interaction",
@@ -18,7 +18,8 @@
1818
"release:minor": "env-cmd -f ./.env release-it minor --ci --verbose --config ./release/.release-it.cjs",
1919
"release:major": "env-cmd -f ./.env release-it major --ci --verbose --config ./release/.release-it.cjs",
2020
"zip": "env-cmd -f ./.env node ./release/zip.cjs",
21-
"create:release": "env-cmd -f ./.env node ./release/create-release.cjs"
21+
"create:release": "env-cmd -f ./.env node ./release/create-release.cjs",
22+
"sync:version": "wp-update-project-version -s package.json -p plugin.php"
2223
},
2324
"pre-commit": [
2425
"lint:fix"
@@ -32,7 +33,7 @@
3233
},
3334
"devDependencies": {
3435
"@kucrut/vite-for-wp": "^0.8.0",
35-
"@release-it/bumper": "^6.0.1",
36+
"@soderlind/wp-project-version-sync": "^2.0.2",
3637
"@tanstack/react-query-devtools": "^5.28.10",
3738
"@types/lodash-es": "^4.17.12",
3839
"@types/node": "^20.12.2",

plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WP React Plugin (DEV)
44
* Plugin URI: https://github.com/j7-dev/wp-react-plugin
55
* Description: WP React Plugin is a boilerplate for creating a WordPress plugin with React, Tailwind, TypeScript, React Query v4, SCSS and Vite.
6-
* Version: 2.0.0
6+
* Version: 1.19.2
77
* Requires at least: 5.7
88
* Requires PHP: 7.4
99
* Author: J7

release/.release-it.cjs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ module.exports = {
2222
push: true,
2323
},
2424
hooks: {
25-
'before:init': [
26-
'yarn build',
25+
// 'before:init': [], // run before initialization
26+
// 'after:[my-plugin]:bump': './bin/my-script.sh', // run after bumping version of my-plugin
27+
'after:bump': [
28+
'yarn build && yarn sync:version',
2729
'yarn create:release',
2830
`cd release/${pluginName} && composer install --no-dev && cd ../..`,
2931
'yarn zip',
30-
], // run before initialization
31-
// 'after:[my-plugin]:bump': './bin/my-script.sh', // run after bumping version of my-plugin
32-
// 'after:bump': ['echo finish'], // run after bumping version
32+
], // run after bumping version
3333
// 'after:git:release': 'echo After git push, before github release', // run after git push, before github release
3434
'after:release': [
3535
'git pull',
@@ -44,13 +44,4 @@ module.exports = {
4444
assets: ['./release/wp-react-plugin.zip'], // relative path
4545
web: false,
4646
},
47-
plugins: {
48-
'@release-it/bumper': {
49-
in: {
50-
file: 'plugin.php',
51-
type: 'text/php',
52-
},
53-
out: ['composer.json', 'package.json'],
54-
},
55-
},
5647
}

0 commit comments

Comments
 (0)