From f7f81e546de56f6e562e9d2b64d78e727f935f7b Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 11 Sep 2024 11:30:55 +0200 Subject: [PATCH 1/3] Include build directory instead of listing practically all the files --- bin/build-plugin-zip.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index ad627e05f0c69..20c331c2cd6b3 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -78,18 +78,6 @@ 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 \ @@ -97,7 +85,7 @@ zip -r gutenberg.zip \ lib \ packages/block-serialization-default-parser/*.php \ post-content.php \ - $build_files \ + build \ build-module \ readme.txt \ changelog.txt \ From ad306b875e4fdbe957c782cad04863c24099e6d6 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 11 Sep 2024 11:56:55 +0200 Subject: [PATCH 2/3] Do not create directory entries in gutenberg.zip --- bin/build-plugin-zip.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index 20c331c2cd6b3..0fa146926e8d3 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -80,7 +80,8 @@ mv gutenberg.tmp.php gutenberg.php # Generate the plugin zip file. status "Creating archive... 🎁" -zip -r gutenberg.zip \ +zip -rD \ + gutenberg.zip \ gutenberg.php \ lib \ packages/block-serialization-default-parser/*.php \ From 6ba9c59a599a3f968081f5dbe68c77faedb79832 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 11 Sep 2024 11:57:07 +0200 Subject: [PATCH 3/3] Use long option names for clarity --- bin/build-plugin-zip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index 0fa146926e8d3..c823ca6a8017f 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -80,7 +80,7 @@ mv gutenberg.tmp.php gutenberg.php # Generate the plugin zip file. status "Creating archive... 🎁" -zip -rD \ +zip --recurse-paths --no-dir-entries \ gutenberg.zip \ gutenberg.php \ lib \