16 lines
640 B
Bash
16 lines
640 B
Bash
#!/bin/bash
|
|||
|
|
# deploy/sync.sh —— 本地 → 远端 rsync(PM 独占执行,agent 不自行运行)
|
||
|
|
set -euo pipefail
|
||
|
|
REMOTE_HOST="100.109.52.26"
|
||
|
|
REMOTE_DIR="/home/xzq/5090/teamWorkspace/zh/PlantAI-rag-new"
|
||
|
|
LOCAL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||
|
|
|
||
|
|
rsync -az --delete \
|
||
|
|
--exclude 'node_modules' --exclude '__pycache__' --exclude '.venv' \
|
||
|
|
--exclude '.venv-backend' \
|
||
|
|
--exclude 'backend/data' --exclude 'frontend/dist' --exclude '.pytest_cache' \
|
||
|
|
--exclude '.env' \
|
||
|
|
--exclude '.git' \
|
||
|
|
"$LOCAL_DIR/" "$REMOTE_HOST:$REMOTE_DIR/" 2>&1 | grep -v "remote port forwarding" || true
|
||
|
|
echo "SYNC OK → $REMOTE_HOST:$REMOTE_DIR"
|