From 1517e7e3bc4e0f970a1360fb94e0f4439fee5039 Mon Sep 17 00:00:00 2001 From: friloo Date: Tue, 22 Sep 2026 14:21:29 +0000 Subject: [PATCH] Build ZIP with tar instead of rsync rsync is not available everywhere; tar honours the same .distignore patterns and ships with every CI runner. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JJxAHYdMfKPoN4koRc4Ci2 --- bin/build-zip.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/build-zip.sh b/bin/build-zip.sh index c8caf5a..05367fb 100755 --- a/bin/build-zip.sh +++ b/bin/build-zip.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Builds build/m365-login.zip – the folder inside the archive is named after the # WordPress.org slug (m365-login), regardless of the repository name. +# Only needs bash, tar and zip. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" @@ -11,11 +12,8 @@ STAGE="$BUILD/$SLUG" rm -rf "$BUILD" mkdir -p "$STAGE" -# rsync honours .distignore-style excludes. -rsync -a --delete \ - --exclude-from="$ROOT/.distignore" \ - --exclude 'build' \ - "$ROOT/" "$STAGE/" +# Copy everything except the patterns listed in .distignore. +tar -C "$ROOT" --exclude-from="$ROOT/.distignore" --exclude='./build' -cf - . | tar -C "$STAGE" -xf - ( cd "$BUILD" @@ -24,4 +22,4 @@ rsync -a --delete \ ) echo "Created $BUILD/$SLUG.zip" -unzip -l "$BUILD/$SLUG.zip" | tail -n +4 | head -n -2 | awk '{print $4}' +( cd "$STAGE" && find . -type f | sort )