| 12345678910111213141516171819202122232425262728293031323334353637 |
- #!/usr/bin/env bash
- set -euo pipefail
- PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
- cd "$PROJECT_DIR"
- if [[ ! -x .venv/bin/python || ! -x .venv/bin/pytest || ! -x .venv/bin/ruff ]]; then
- echo "release gate failed: .venv is incomplete" >&2
- exit 1
- fi
- if [[ ! -d web/node_modules ]]; then
- echo "release gate failed: web/node_modules is missing; run npm ci in web/" >&2
- exit 1
- fi
- echo "[1/6] Python syntax"
- .venv/bin/python -m compileall -q agents api supply_agent supply_infra scripts
- echo "[2/6] Static checks for release-critical code"
- .venv/bin/ruff check agents/find_agent api supply_infra alembic scripts tests
- echo "[3/6] Fresh-database migration"
- .venv/bin/pytest -q tests/migrations/test_fresh_database.py
- echo "[4/6] Offline regression suite"
- .venv/bin/pytest -q
- echo "[5/6] Production frontend build"
- (
- cd web
- npm run build
- )
- echo "[6/6] Patch whitespace"
- git diff --check
- echo "release gate passed"
|