Skip to content

Commit dd95db8

Browse files
Copilotcolinmurphy
andcommitted
Fix package.json version script paths and update workflow
Co-authored-by: colinmurphy <[email protected]>
1 parent ae2e5cd commit dd95db8

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/create-release-branch.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ jobs:
7171
# Apply version bumps from changesets
7272
pnpm changeset version
7373
74+
# Run version script for the plugin if it exists
75+
if [ -f "plugins/${{ steps.plugin.outputs.slug }}/package.json" ]; then
76+
echo "Checking for version script in plugins/${{ steps.plugin.outputs.slug }}/package.json"
77+
if cat "plugins/${{ steps.plugin.outputs.slug }}/package.json" | grep -q '"version".*:'; then
78+
echo "Running version script for ${{ steps.plugin.outputs.slug }}"
79+
cd "plugins/${{ steps.plugin.outputs.slug }}"
80+
npm run version
81+
cd ../..
82+
else
83+
echo "No version script found for ${{ steps.plugin.outputs.slug }}"
84+
fi
85+
else
86+
echo "No package.json found for plugin ${{ steps.plugin.outputs.slug }}"
87+
fi
88+
7489
# Configure git
7590
git config user.name "github-actions"
7691
git config user.email "[email protected]"

plugins/hwp-previews/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
99
"test:e2e:debug": "npm run test:e2e -- --debug",
1010
"wp-env": "wp-env",
11-
"version": "./scripts/sync-versions.sh"
11+
"version": "./bin/sync-package-version.sh"
1212
},
1313
"keywords": [],
1414
"author": "wpengine",

plugins/wp-graphql-webhooks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Webhooks solution for WordPress",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"version": "./scripts/sync-versions.sh"
8+
"version": "./bin/sync-package-version.sh"
99
},
1010
"keywords": [],
1111
"author": "wpengine",

0 commit comments

Comments
 (0)