Skip to content

Commit 9bdfebf

Browse files
sirrealgziolo
andauthored
Build Plugin: Simplify and improve zip contents (#65232)
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 <[email protected]> Co-authored-by: gziolo <[email protected]>
1 parent 1a60dff commit 9bdfebf

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

bin/build-plugin-zip.sh

+3-14
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,15 @@ npm run build
7878
php bin/generate-gutenberg-php.php > gutenberg.tmp.php
7979
mv gutenberg.tmp.php gutenberg.php
8080

81-
build_files=$(
82-
ls build/*/*.{js,js.map,css,asset.php} \
83-
build/block-library/blocks/*.php \
84-
build/block-library/blocks/*/block.json \
85-
build/block-library/blocks/*/*.{js,js.map,css,asset.php} \
86-
build/edit-widgets/blocks/*/block.json \
87-
build/widgets/blocks/*.php \
88-
build/widgets/blocks/*/block.json \
89-
build/style-engine/*.php \
90-
)
91-
92-
9381
# Generate the plugin zip file.
9482
status "Creating archive... 🎁"
95-
zip -r gutenberg.zip \
83+
zip --recurse-paths --no-dir-entries \
84+
gutenberg.zip \
9685
gutenberg.php \
9786
lib \
9887
packages/block-serialization-default-parser/*.php \
9988
post-content.php \
100-
$build_files \
89+
build \
10190
build-module \
10291
readme.txt \
10392
changelog.txt \

0 commit comments

Comments
 (0)