Skip to content

Commit

Permalink
Scripts: plugin-zip to include root path files (#41439)
Browse files Browse the repository at this point in the history
* initial commit

* add condition to not add `.` in the path of root files

* Update CHANGELOG.md

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
  • Loading branch information
amustaque97 and gziolo committed Jun 1, 2022
1 parent 228adc9 commit c536382
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit c536382

Please sign in to comment.