Skip to content

Commit 2330106

Browse files
authored
Merge pull request #37 from WebDecoy/fix/build-exclude-vendor
fix(build): exclude dev vendor/ from the plugin ZIP
2 parents e6551c3 + f6a209b commit 2330106

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

build.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@ mkdir -p "${DIST_DIR}"
4646

4747
# Copy plugin files into build directory
4848
echo "Copying plugin files..."
49-
rsync -a --exclude='build' --exclude='dist' --exclude='build.sh' . "${BUILD_DIR}/${PLUGIN_SLUG}/"
49+
# Excludes are anchored with a leading slash to the plugin root so we only drop
50+
# the top-level dev vendor/ (composer dev tools) — NOT admin/js/vendor/, which
51+
# holds the bundled Chart.js.
52+
rsync -a \
53+
--exclude='/build' --exclude='/dist' --exclude='/build.sh' \
54+
--exclude='/.git' --exclude='/.github' --exclude='/.svn-wporg' \
55+
--exclude='/vendor' --exclude='/sdk/vendor' \
56+
--exclude='node_modules' --exclude='/tests' \
57+
--exclude='/composer.json' --exclude='/composer.lock' \
58+
--exclude='/phpcs.xml.dist' --exclude='/phpstan.neon' \
59+
. "${BUILD_DIR}/${PLUGIN_SLUG}/"
5060

5161
# Update version in main plugin file
5262
echo "Setting version to ${VERSION}..."

0 commit comments

Comments
 (0)