76 lines
1.9 KiB
Bash
Executable File
76 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
content_targets=(
|
|
.dockerignore
|
|
compose.yaml
|
|
docker-compose.dev.yml
|
|
deploy
|
|
docker
|
|
frontend/vite.config.ts
|
|
README.md
|
|
docs/install
|
|
docs/installazione-docker-4-contesti.md
|
|
.env.example
|
|
scripts/run-stack.sh
|
|
scripts/docker-smoke.sh
|
|
)
|
|
|
|
matches=$(
|
|
rg -n -i \
|
|
-g '!deploy/workspaces/**' \
|
|
-g '!docker/session-migrate.sh' \
|
|
-g '!docker/cutover-legacy-sessions.sh' \
|
|
-g '!docker/smoke/**' \
|
|
'omics_portal|chirone|localllm_default|datamart-builder|compose\.production\.yaml|compose\.psd-local\.yaml' \
|
|
"${content_targets[@]}" || true
|
|
)
|
|
|
|
runtime_psd_matches=$(
|
|
rg -n -i \
|
|
-g '!deploy/workspaces/**' \
|
|
-g '!docker/session-migrate.sh' \
|
|
-g '!docker/cutover-legacy-sessions.sh' \
|
|
-g '!docker/smoke/**' \
|
|
'\bpsd\b' \
|
|
.dockerignore compose.yaml docker-compose.dev.yml deploy docker frontend/vite.config.ts \
|
|
.env.example scripts/run-stack.sh scripts/docker-smoke.sh || true
|
|
)
|
|
|
|
offenders=()
|
|
for superseded_file in \
|
|
deploy/compose.production.yaml \
|
|
deploy/compose.psd-local.yaml.example \
|
|
deploy/compose.psd-local.yaml \
|
|
scripts/bootstrap-local-psd-docker-config.sh \
|
|
harness/tests/test_psd_local_compose_contract.py
|
|
do
|
|
[[ ! -e "$superseded_file" ]] || offenders+=("$superseded_file (forbidden active deployment filename)")
|
|
done
|
|
|
|
if [[ -n "$matches" ]]; then
|
|
while IFS= read -r match; do
|
|
offenders+=("$match")
|
|
done <<<"$matches"
|
|
fi
|
|
|
|
if [[ -n "$runtime_psd_matches" ]]; then
|
|
while IFS= read -r match; do
|
|
offenders+=("$match")
|
|
done <<<"$runtime_psd_matches"
|
|
fi
|
|
|
|
if rg -n 'command -v pi|PI_BIN="pi"|PI_BIN=pi' scripts/run-stack.sh >/dev/null; then
|
|
offenders+=("scripts/run-stack.sh (requires a host Pi binary)")
|
|
fi
|
|
|
|
if ((${#offenders[@]})); then
|
|
printf '%s\n' "active deployment coupling found:" >&2
|
|
printf '%s\n' "${offenders[@]}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "no active PSD, Chirone, or portal deployment coupling found."
|