2026-08-25 20:47:08 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
# deploy/sync.sh —— 本地 → 远端 rsync(PM 独占执行,agent 不自行运行)
|
2026-08-28 23:27:18 +08:00
|
|
|
# 2026-08-28:本机(Mac)仅公网地址可达;内网 192.168.0.175 与 Tailscale 均不通。
|
2026-08-25 20:47:08 +08:00
|
|
|
set -euo pipefail
|
2026-08-28 23:27:18 +08:00
|
|
|
REMOTE_HOST="8.163.92.8"
|
|
|
|
|
SSH_OPTS="-p 26518 -o ClearAllForwardings=yes"
|
2026-08-25 20:47:08 +08:00
|
|
|
REMOTE_DIR="/home/xzq/5090/teamWorkspace/zh/PlantAI-rag-new"
|
|
|
|
|
LOCAL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
|
|
2026-08-28 23:27:18 +08:00
|
|
|
rsync -az --delete -e "ssh $SSH_OPTS" \
|
2026-08-25 20:47:08 +08:00
|
|
|
--exclude 'node_modules' --exclude '__pycache__' --exclude '.venv' \
|
|
|
|
|
--exclude '.venv-backend' \
|
2026-08-31 12:56:47 +08:00
|
|
|
--exclude 'sdk/data' --exclude 'ui/dist' --exclude 'tooling/build' --exclude 'knowledge' --exclude '.pytest_cache' \
|
2026-08-25 20:47:08 +08:00
|
|
|
--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"
|