From 4d55fb477695d4cd01e1de5cb11c08ef4578de38 Mon Sep 17 00:00:00 2001 From: ericwyuan Date: Tue, 1 Sep 2026 09:09:21 +0800 Subject: [PATCH] =?UTF-8?q?chore(deploy):=20=E5=88=AB=E6=8A=8A=20macOS=20?= =?UTF-8?q?=E7=9A=84=20xattr=20=E5=A1=9E=E8=BF=9B=20tar=EF=BC=8C=E7=BE=A4?= =?UTF-8?q?=E6=99=96=E8=AF=BB=E4=B8=8D=E6=87=82=E5=8F=AA=E4=BC=9A=E5=88=B7?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 --- deploy/push.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy/push.sh b/deploy/push.sh index ba5f7e8..bce6a17 100755 --- a/deploy/push.sh +++ b/deploy/push.sh @@ -42,8 +42,13 @@ if sh_ "[ -f '$APP/static/index.html' ]" 2>/dev/null; then fi echo "==> static dir: $STATIC" +# macOS bsdtar writes com.apple.provenance xattrs and ._ resource forks that +# the NAS's tar cannot read; it warns once per file and copies nothing useful. +TAR="tar czf - --no-xattrs" +export COPYFILE_DISABLE=1 + echo "==> backend" -tar czf - --exclude .venv --exclude .env --exclude __pycache__ \ +$TAR --exclude .venv --exclude .env --exclude __pycache__ \ --exclude '*.db' --exclude tests --exclude .pytest_cache \ -C "$REPO/backend" . | sh_ "tar xzf - -C '$APP/backend'" @@ -53,7 +58,7 @@ if [ ! -f "$REPO/client/build/index.html" ]; then exit 1 fi sh_ "rm -rf '$STATIC' && mkdir -p '$STATIC'" -tar czf - -C "$REPO/client/build" . | sh_ "tar xzf - -C '$STATIC'" +$TAR -C "$REPO/client/build" . | sh_ "tar xzf - -C '$STATIC'" echo "==> restart" sh_ "sh '$APP/deploy/stop.sh' >/dev/null 2>&1; sleep 2; sh '$APP/deploy/start.sh'"