Files
eth_hedge_sim/deploy/lib/update.sh
T
dekun da5eb4c18c Add Fleet control plane and split manage.sh deploy menu.
Strategy nodes gain fleet token APIs; control/ app for local ops; manage.sh offers strategy vs control one-click deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 10:46:40 +08:00

32 lines
853 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# deploy/lib/update.sh — 更新(仅 git pull,禁止 scp
set -e
set -u
if [ -n "${BASH_VERSION:-}" ]; then
set -o pipefail
fi
LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=common.sh
source "${LIB_DIR}/common.sh"
main_update() {
require_root
if ! REPO_ROOT="$(resolve_repo_root)"; then
die "未找到安装目录 ${INSTALL_ROOT},请先执行「1) 一键部署策略机」"
fi
if ! repo_ready "${REPO_ROOT}"; then
die "安装不完整,请先执行「1) 一键部署策略机」"
fi
step "更新 — 环境检测 (缺则装,有则跳过)"
ensure_system_deps
step "更新 比特骆驼自动化对冲系统 (git pull + 构建 + pm2 reload)"
bash "${REPO_ROOT}/deploy/pull_and_restart.sh"
verify_health || true
echo ""
log "更新完成"
}
main_update "$@"