#!/bin/sh
# M8 dogfood supply-chain gate (SEC-09). Terse; first failure stops.
# Needs: cargo-audit (else note + skip), cargo-deny (if present).
set -eu
if command -v cargo-audit >/dev/null 2>&1; then
  cargo audit --deny warnings
else
  echo "note: cargo-audit missing; skipping audit"
fi
if command -v cargo-deny >/dev/null 2>&1; then
  cargo deny check
else
  echo "note: cargo-deny missing; skipping deny"
fi
cargo build --locked --release
RUSTFLAGS="-Dwarnings" cargo check --locked --workspace
