mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 01:22:13 +00:00
Updates tools/hooks & Fixes mapmerge2 (#17416)
* a * python ver --------- Co-authored-by: DreamySkrell <>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
PY=python3
|
||||
if [ "$*" = "-m precommit" ]; then
|
||||
echo "Hooks are being updated..."
|
||||
echo "Details: https://github.com/tgstation/tgstation/pull/55658"
|
||||
if [ "$(uname -o)" = "Msys" ]; then
|
||||
tools/hooks/Install.bat
|
||||
else
|
||||
tools/hooks/install.sh
|
||||
fi
|
||||
echo "---------------"
|
||||
exec tools/hooks/pre-commit.hook
|
||||
else
|
||||
PY=python
|
||||
echo "tools/hooks/python.sh is replaced by tools/bootstrap/python"
|
||||
echo "Details: https://github.com/tgstation/tgstation/pull/55658"
|
||||
exit 1
|
||||
fi
|
||||
PATHSEP=$($PY - <<'EOF'
|
||||
import sys, os
|
||||
if sys.version_info.major != 3 or sys.version_info.minor < 6:
|
||||
sys.stderr.write("Python 3.6+ is required: " + sys.version + "\n")
|
||||
exit(1)
|
||||
print(os.pathsep)
|
||||
EOF
|
||||
)
|
||||
export PYTHONPATH=tools/mapmerge2/${PATHSEP}${PYTHONPATH}
|
||||
$PY "$@"
|
||||
|
||||
Reference in New Issue
Block a user