1
0
forked from baron/baron-sso

make drop 초기화 추가. 한맥그룹 기본값 추가

This commit is contained in:
2026-04-27 17:51:46 +09:00
parent 3fe32b1dfe
commit 08aa745e30
8 changed files with 334 additions and 18 deletions

View File

@@ -0,0 +1,79 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
dry_run_dev="$(
make --dry-run --always-make -C "$repo_root" dev DEV_SERVICES="backend adminfront" 2>&1
)"
if ! grep -q "Ensuring Infra stack" <<<"$dry_run_dev"; then
echo "make dev must ensure the infra stack first." >&2
exit 1
fi
if ! grep -q "Ensuring Ory stack" <<<"$dry_run_dev"; then
echo "make dev must ensure the Ory stack first." >&2
exit 1
fi
app_up_line="$(
grep -E "docker compose .* -f docker-compose.yaml up .*backend.*adminfront" <<<"$dry_run_dev" | tail -1
)"
if [[ -z "$app_up_line" ]]; then
echo "make dev must run docker compose up for development app services." >&2
exit 1
fi
if grep -q -- " -d" <<<"$app_up_line"; then
echo "make dev must run app services in foreground attach mode without -d." >&2
exit 1
fi
dry_run_up_dev="$(
make --dry-run --always-make -C "$repo_root" up-dev 2>&1
)"
if ! grep -q "Ensuring Infra stack" <<<"$dry_run_up_dev"; then
echo "make up-dev must ensure the infra stack." >&2
exit 1
fi
if ! grep -q "Ensuring Ory stack" <<<"$dry_run_up_dev"; then
echo "make up-dev must ensure the Ory stack." >&2
exit 1
fi
dry_run_up_all="$(
make --dry-run --always-make -C "$repo_root" up-all 2>&1
)"
if ! grep -q "Ensuring Docker networks" <<<"$dry_run_up_all"; then
echo "make up-all must ensure external Docker networks before compose up." >&2
exit 1
fi
if ! grep -q 'docker network create "$network"' <<<"$dry_run_up_all"; then
echo "make up-all must create missing external Docker networks." >&2
exit 1
fi
dry_run_drop="$(
make --dry-run --always-make -C "$repo_root" drop 2>&1
)"
if ! grep -q "Dropping Baron SSO local Docker stack" <<<"$dry_run_drop"; then
echo "make drop must announce that it is dropping the local stack." >&2
exit 1
fi
if ! grep -q -- "down -v --rmi local" <<<"$dry_run_drop"; then
echo "make drop must remove containers, volumes, and local compose images." >&2
exit 1
fi
if ! grep -q "docker rm -f" <<<"$dry_run_drop"; then
echo "make drop must force-remove known fixed-name stack containers." >&2
exit 1
fi