Files
computer-playbook/scripts/system/network/docker/stack_refresh.sh
T
kevinveenbirkenbach 664457b739 test(lint): verify every make <target> reference resolves
Catches refactor drift across `.sh`, `Makefile` recursive calls, and
GitHub workflows. Includes fixes for the 5 bugs the new test surfaced
on first run: `make -C ROOT down`/`up` in the network stack refresh
helper (missed during the compose-* rename) and four
`make compose-deploymode=…` / `compose-deployapps=…` typos in
07/08/09_deploy_*.sh plus three docstring/echo references
(missing space after `compose-deploy`, introduced by the
deploy → compose-deploy sed-rename).
2026-05-21 22:58:27 +02:00

20 lines
593 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../" && pwd)"
stack_was_running=0
if command -v docker >/dev/null 2>&1 && docker ps --format '{{.Names}}' 2>/dev/null | grep -Eq '^infinito_nexus_'; then
stack_was_running=1
fi
if [[ "${stack_was_running}" -ne 1 ]]; then
echo "[stack-refresh] no running Infinito dev stack detected; skipping stack recreate"
exit 0
fi
echo "[stack-refresh] recreating running Infinito dev stack"
make -C "${REPO_ROOT}" compose-down
make -C "${REPO_ROOT}" compose-up