Skip to content

Commit 555ccdb

Browse files
authored
Merge pull request #311 from wpengine/copilot/fix-310
chore: Run version script when creating a release branch
2 parents 6bd6378 + dd95db8 commit 555ccdb

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
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/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# HWP Previews
22

3+
## 0.0.5
4+
5+
### Patch Changes
6+
7+
- [#308](https://github.com/wpengine/hwptoolkit/pull/308) [`8906c22`](https://github.com/wpengine/hwptoolkit/commit/8906c22fa5192776f80bd69325037ec261dee64c) Thanks [@colinmurphy](https://github.com/colinmurphy)! - docs: Updated docs for testing.
8+
39
## 0.0.4
410

511
### Patch Changes

plugins/hwp-previews/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@wpengine/hwp-previews-wordpress-plugin",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"private": true,
55
"description": "Headless Previews solution for WordPress: fully configurable preview URLs via the settings page.",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
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/hwp-previews/tests/bootstrap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* This is a global bootstrap file for autoloading.
44
*
55
* @package Tests\HWP\Previews
6+
*
7+
* @link https://github.com/wpengine/hwptoolkit/blob/main/plugins/hwp-previews/TESTING.md
68
*/
79

810
// Ensure proper autoloading

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)