#!/usr/bin/env bash # # Pre-push linux gate. Pushing to the HF Space deploys to prod and runs NO tests # there — so this is the enforcement point between local and prod. Aborts the # push if the linux gate is red. # # Activate once per clone: git config core.hooksPath hooks # Escape hatch (docs-only / emergency): SKIP_LINUX_GATE=1 git push set -euo pipefail if [ "${SKIP_LINUX_GATE:-0}" = "1" ]; then echo "[pre-push] SKIP_LINUX_GATE=1 — skipping linux gate (by request)." exit 0 fi ROOT="$(git rev-parse --show-toplevel)" echo "[pre-push] running linux gate before deploy (set SKIP_LINUX_GATE=1 to bypass)…" exec "$ROOT/scripts/linux-gate.sh"