Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts: plugin-zip to include root path files #41439

Merged
merged 3 commits into from Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Fix incorrect handling in `plugin-zip` for root-level files and some specific platform conditions ([#41439](https://github.com/WordPress/gutenberg/pull/41439)).

## 23.1.0 (2022-05-18)

### New Feature
Expand Down
3 changes: 2 additions & 1 deletion packages/scripts/scripts/plugin-zip.js
Expand Up @@ -49,7 +49,8 @@ if ( hasPackageProp( 'files' ) ) {

files.forEach( ( file ) => {
stdout.write( ` Adding \`${ file }\`.\n` );
zip.addLocalFile( file, dirname( file ) );
const zipDirectory = dirname( file );
zip.addLocalFile( file, zipDirectory !== '.' ? zipDirectory : '' );
} );

zip.writeZip( `./${ name }.zip` );
Expand Down