Skip to content

Commit b383bb9

Browse files
USERSATOSHIUSERSATOSHImanzoorwanijk
authored
Move PHP Sync Issue Generator file to @wordpress/release-tools (WordPress#78456)
* refactor: move generate-php-sync-issue.mjs to release tool * chore: fix linting issues * Create issue content file in root --------- Co-authored-by: USERSATOSHI <tusharbharti@git.wordpress.org> Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
1 parent 1948a4b commit b383bb9

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

bin/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"build.mjs",
3232
"cherry-pick.mjs",
3333
"dev.mjs",
34-
"generate-php-sync-issue.mjs",
3534
"log-performance-results.js",
3635
"packages/build-vendors.mjs",
3736
"packages/build.mjs",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"preother:check-local-changes": "npm run docs:build && npm run --workspace @wordpress/theme build",
149149
"other:check-local-changes": "npm run --workspace @wordpress/validation-tools check-local-changes --",
150150
"other:cherry-pick": "node ./bin/cherry-pick.mjs",
151-
"other:generate-php-sync-issue": "node ./bin/generate-php-sync-issue.mjs",
151+
"other:generate-php-sync-issue": "npm run --workspace @wordpress/release-tools generate-php-sync-issue --",
152152
"other:update-packages:php": "wp-env run --env-cwd='wp-content/plugins/gutenberg' cli composer update --no-interaction",
153153
"postinstall": "patch-package && node ./patches/patch-xcode.js",
154154
"prepare": "husky install",
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ async function main() {
153153
const content = generateIssueContent( result );
154154

155155
// Write the Markdown content to a file
156-
fs.writeFileSync( nodePath.join( __dirname, 'issueContent.md' ), content );
156+
const projectRoot = nodePath.resolve( __dirname, '..', '..' );
157+
fs.writeFileSync(
158+
nodePath.join( projectRoot, 'issueContent.md' ),
159+
content
160+
);
157161
}
158162

159163
function validateDate( sinceArg ) {

tools/release/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@
3737
},
3838
"publishConfig": {
3939
"access": "public"
40+
},
41+
"scripts": {
42+
"generate-php-sync-issue": "node ./generate-php-sync-issue.mjs"
4043
}
4144
}

0 commit comments

Comments
 (0)