1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 05:19:12 +03:00
Files
ac-deploy/sim/cluster0/scripts/purge-legacy-monolith.sh
Anton Afanasyev b47f91b1ab Cluster deploy: ac/* only, hub assets, auth routes at project root.
Remove monolith clone path; add hub deploy, legacy purge, composed-backend
login/logout nginx locations, and full hub asset rsync validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 22:53:38 +02:00

31 lines
817 B
Bash
Executable File

#!/bin/sh
# Remove frozen git://f0xx.org/android_cast checkout from cluster nodes.
# Run once after switching to ac/* compose deploy (populate uses ac-workspace only).
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
# shellcheck source=/dev/null
. "$ROOT/scripts/lib/common.sh"
load_cluster_env
LEGACY="${APP_ROOT}/android_cast"
if [ ! -e "$LEGACY" ]; then
log "no legacy monolith at $LEGACY — nothing to purge"
exit 0
fi
if [ -d "${LEGACY}/.git" ]; then
_url="$(git -C "$LEGACY" config --get remote.origin.url 2>/dev/null || true)"
case "$_url" in
*android_cast*)
log "removing legacy monolith $_url at $LEGACY"
;;
*)
warn "unexpected origin $_url — not removing (manual review)"
exit 1
;;
esac
fi
rm -rf "$LEGACY"
log "purge-legacy-monolith_ok $(host_short)"