pre-commit-makerst 358 B

123456789101112
  1. #!/usr/bin/env bash
  2. # Git pre-commit hook that checks the class reference syntax using makerst.py.
  3. # Workaround because we can't execute the .py file directly on windows
  4. PYTHON=python
  5. py_ver=$($PYTHON -c "import sys; print(sys.version_info.major)")
  6. if [[ "$py_ver" != "3" ]]; then
  7. PYTHON+=3
  8. fi
  9. $PYTHON doc/tools/makerst.py doc/classes modules --dry-run