Skip to content

Commit

Permalink
Build Plugin: Simplify and improve zip contents (#65232)
Browse files Browse the repository at this point in the history
Include all of /build directory. Behavior is largely unchanged but logic is simplified.
Exclude directory entries. Directory structure is preserved but irrelevant directory attributes are excluded.

---
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
  • Loading branch information
sirreal authored Sep 12, 2024
1 parent 1a60dff commit 9bdfebf
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,15 @@ npm run build
php bin/generate-gutenberg-php.php > gutenberg.tmp.php
mv gutenberg.tmp.php gutenberg.php

build_files=$(
ls build/*/*.{js,js.map,css,asset.php} \
build/block-library/blocks/*.php \
build/block-library/blocks/*/block.json \
build/block-library/blocks/*/*.{js,js.map,css,asset.php} \
build/edit-widgets/blocks/*/block.json \
build/widgets/blocks/*.php \
build/widgets/blocks/*/block.json \
build/style-engine/*.php \
)


# Generate the plugin zip file.
status "Creating archive... 🎁"
zip -r gutenberg.zip \
zip --recurse-paths --no-dir-entries \
gutenberg.zip \
gutenberg.php \
lib \
packages/block-serialization-default-parser/*.php \
post-content.php \
$build_files \
build \
build-module \
readme.txt \
changelog.txt \
Expand Down

0 comments on commit 9bdfebf

Please sign in to comment.