Files
hcie-rust-v3.05/.githooks/post-commit
T
2026-07-09 02:59:53 +03:00

23 lines
811 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
REPO_ROOT=$(git rev-parse --show-toplevel)
SCRIPT="${REPO_ROOT}/.githooks/generate_semantic_report.py"
REPORT="${REPO_ROOT}/logs/semantic_impact_report.txt"
if [ -f "$SCRIPT" ]; then
cd "$REPO_ROOT"
echo ""
echo "🔍 SEMANTIK ETKI RAPORU (commit sonrasi):"
echo "─────────────────────────────────────────────"
python3 "$SCRIPT" --mode last | tee "$REPORT"
RESULT=${PIPESTATUS[0]}
if [ $RESULT -ne 0 ]; then
echo ""
echo "⚠️ Yukarida BLOKE EDIEN risk seviyesi tespit edildi. Commit tamamlanmistir;"
echo " ama ilgili modüllerin doğru çalışıp çalışmadığını `cargo check --workspace` ile kontrol edin."
echo ""
fi
fi
exit 0