From 5599817f4fc06f8d511bf463f2229a598e6e268e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Almeida?= Date: Sun, 17 May 2026 20:15:55 +0100 Subject: [PATCH] fix(release): replace rsync with cp -RL for cross-environment portability Linuxbrew CI ships without rsync, which broke the homebrew-core formula build. cp -RL provides the same dereference-symlinks behavior on both BSD and GNU coreutils, no extra dependency required. --- scripts/release/package-web.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/scripts/release/package-web.sh b/scripts/release/package-web.sh index 130df7a661..dbf773bbcd 100755 --- a/scripts/release/package-web.sh +++ b/scripts/release/package-web.sh @@ -17,19 +17,12 @@ fi rm -rf "$OUT_DIR" mkdir -p "$OUT_DIR" -# Copy with symlinks dereferenced so pnpm's .pnpm/ structure survives -# archiving (symlinks cause issues on Windows even inside tar). The -# standalone output may contain broken symlinks from partial tracing — -# --safe-links skips those and rsync exits with code 23 (partial transfer), -# which is expected. -rsync -a --copy-links --safe-links "$WEB_DIR/.next/standalone/" "$OUT_DIR/" || { - rc=$? - if [ "$rc" -eq 23 ]; then - echo "Warning: some broken symlinks were skipped (expected for standalone output)" - else - exit "$rc" - fi -} +# Copy the standalone bundle with symlinks dereferenced so pnpm's +# .pnpm/ structure survives archiving (symlinks cause issues on +# Windows even inside tar). cp -RL ships with both BSD and GNU +# coreutils; rsync isn't present in Linuxbrew CI. The trailing `.` is +# the portable way to copy directory contents on both flavors. +cp -RL "$WEB_DIR/.next/standalone/." "$OUT_DIR/" # pnpm's .pnpm virtual store keeps hoisted packages in # node_modules/.pnpm/node_modules/ which is unreachable via normal Node # module resolution from web/node_modules/next/. Copy everything into