Skip to content

Commit

Permalink
Merge pull request #5664 from WordPress/add/dynamic-build-file-bundling
Browse files Browse the repository at this point in the history
Build: Dynamically pick JS/CSS build files for ZIP gen
  • Loading branch information
mcsf authored Mar 20, 2018
2 parents aefb285 + ec18afa commit 1059cd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ rm -f gutenberg.zip
php bin/generate-gutenberg-php.php > gutenberg.tmp.php
mv gutenberg.tmp.php gutenberg.php

build_files=$(ls **/build/*.{js,css})

# Generate the plugin zip file
status "Creating archive..."
zip -r gutenberg.zip \
Expand All @@ -99,8 +101,7 @@ zip -r gutenberg.zip \
blocks/library/*/*.php \
post-content.js \
$vendor_scripts \
{blocks,components,date,editor,element,hooks,i18n,data,utils,edit-post,viewport,plugins,core-data}/build/*.{js,map} \
{blocks,components,editor,edit-post}/build/*.css \
$build_files \
languages/gutenberg.pot \
languages/gutenberg-translations.php \
README.md
Expand Down

0 comments on commit 1059cd2

Please sign in to comment.