-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project management: Add prepublish packages command for npm releases #19214
Conversation
await runPushGitChangesStep( releaseBranch, abortMessage ); | ||
|
||
abortMessage = 'Aborting! The release is finished though.'; | ||
await runCleanLocalCloneStep( abortMessage ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This references svn folder which doesn’t exist in this context causing errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested, but it's looking good.
Good job.
Co-Authored-By: Riad Benguella <benguella@gmail.com>
svnWorkingDirectoryPath, | ||
].map( async ( directoryPath ) => { | ||
if ( fs.existsSync( directoryPath ) ) { | ||
await rimraf( directoryPath, ( err ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They do the same trick in rimraf
in their bin implementation:
https://github.com/isaacs/rimraf/blob/d82bc81f251ba2cc86dc26361a820631091b3e9e/bin.js#L44-L48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes the following error I observed locally:
The following error happened during the "Cleaning the temporary folder" step:
AssertionError [ERR_ASSERTION]: rimraf: callback function required
at rimraf (/Users/gziolo/PhpstormProjects/gutenberg/node_modules/rimraf/rimraf.js:52:10)
It was tested already on |
Description
This PR adds a new command which handles prepublish to npm steps for a stable version of WordPress packages.
At the moment it only covers those steps which handle git management before Lerna takes over publishing to npm.
Check more details about the manual process in https://github.com/WordPress/gutenberg/blob/master/docs/contributors/release.md#synchronizing-wordpress-trunk.
How has this been tested?
./bin/commander.js prepublish-packages-stable
Checklist: