pre-commit-make-rst 360 B

12345678910111213
  1. #!/usr/bin/env bash
  2. # Git pre-commit hook that checks the class reference syntax using make_rst.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/make_rst.py doc/classes modules --dry-run