chore(deploy): 别把 macOS 的 xattr 塞进 tar,群晖读不懂只会刷警告
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,8 +42,13 @@ if sh_ "[ -f '$APP/static/index.html' ]" 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
echo "==> static dir: $STATIC"
|
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"
|
echo "==> backend"
|
||||||
tar czf - --exclude .venv --exclude .env --exclude __pycache__ \
|
$TAR --exclude .venv --exclude .env --exclude __pycache__ \
|
||||||
--exclude '*.db' --exclude tests --exclude .pytest_cache \
|
--exclude '*.db' --exclude tests --exclude .pytest_cache \
|
||||||
-C "$REPO/backend" . | sh_ "tar xzf - -C '$APP/backend'"
|
-C "$REPO/backend" . | sh_ "tar xzf - -C '$APP/backend'"
|
||||||
|
|
||||||
@@ -53,7 +58,7 @@ if [ ! -f "$REPO/client/build/index.html" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sh_ "rm -rf '$STATIC' && mkdir -p '$STATIC'"
|
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"
|
echo "==> restart"
|
||||||
sh_ "sh '$APP/deploy/stop.sh' >/dev/null 2>&1; sleep 2; sh '$APP/deploy/start.sh'"
|
sh_ "sh '$APP/deploy/stop.sh' >/dev/null 2>&1; sleep 2; sh '$APP/deploy/start.sh'"
|
||||||
|
|||||||
Reference in New Issue
Block a user