From 379ae6a8456c88ae0b60c3ab84c74c79a8fdc682 Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Sat, 21 Nov 2026 18:28:08 +0500 Subject: [PATCH] =?UTF-8?q?PEP-230:=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=D0=BC=20=D1=81=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82=20=D1=82?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D1=82=D0=B5=D0=BA=D1=83=D1=89?= =?UTF-8?q?=D1=83=D1=8E=20=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=87=D0=B5=D0=B9=20=D0=BA=D0=BE=D0=BF=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.2 --- scripts/server-move/mac-cutover.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/server-move/mac-cutover.sh b/scripts/server-move/mac-cutover.sh index d442cff2..7397fba4 100755 --- a/scripts/server-move/mac-cutover.sh +++ b/scripts/server-move/mac-cutover.sh @@ -20,13 +20,14 @@ SERVICES="bot watchdog web observer" S true || die "сервер недоступен" say "живых сессий агентов: $(sqlite3 -readonly "$PH/peppa.db" "select count(*) from sessions where status not in ('done','failed')")" DIRS=$(sqlite3 -readonly "$PH/peppa.db" "select workspace_path from projects where deleted_at is null; select workspace_path from sessions where workspace_path is not null and status not in ('done','failed');" | sort -u) +LIVE=$(sqlite3 -readonly "$PH/peppa.db" "select workspace_path from projects where key = '${PEPPA_PLATFORM_KEY:-PEP}'") LOST=0 for d in $DIRS; do [ -d "$d/.git" ] || [ -f "$d/.git" ] || continue - [ -d "$d/scripts/server-move" ] || [ -f "$d/scripts/live-deploy.sh" ] && continue # сама платформа: её код уже в Gitea + [ "$d" = "$LIVE" ] && continue # живая копия платформы: в ней не коммитят, её код уже в Gitea br=$(git -C "$d" branch --show-current 2>/dev/null || true) - dirty=$(git -C "$d" status --porcelain 2>/dev/null | grep -v '^?? .peppa/' | wc -l | tr -d ' ') - ahead=$(git -C "$d" log --oneline --branches --not --remotes 2>/dev/null | wc -l | tr -d ' ') + dirty=$(git -C "$d" status --porcelain 2>/dev/null | { grep -v '^?? .peppa/' || true; } | wc -l | tr -d ' ') + ahead=$(git -C "$d" log --oneline HEAD --not --remotes 2>/dev/null | wc -l | tr -d ' ') [ "$dirty" = 0 ] && [ "$ahead" = 0 ] && continue say "не в Gitea: $d (ветка ${br:-?}, изменённых файлов $dirty, неотправленных коммитов $ahead)" [ "$MODE" = go ] || continue