Sync from GitHub main #1
@@ -4,31 +4,21 @@ set -Eeuo pipefail
|
||||
ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd -- "${ROOT}"
|
||||
|
||||
echo "==> Rejecting Python source/runtime dependencies"
|
||||
if find .. -type f -name '*.py' -print -quit | grep -q .; then
|
||||
find .. -type f -name '*.py' -print
|
||||
echo "ERROR: Python source files are not allowed in CO-SERVER." >&2
|
||||
exit 1
|
||||
fi
|
||||
if find . -maxdepth 1 -type f -name 'requirements*.txt' -print -quit | grep -q .; then
|
||||
find . -maxdepth 1 -type f -name 'requirements*.txt' -print
|
||||
echo "ERROR: Python requirements files are not allowed." >&2
|
||||
exit 1
|
||||
fi
|
||||
if grep -RInE --exclude-dir=.git --exclude='*.md' --exclude='PORT_TROUBLESHOOTING.txt' '(python3?|\.venv|pip install|consumer_server_cli\.py)' ..; then
|
||||
echo "ERROR: Python runtime references remain in executable/configuration files." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "==> Enforcing repository runtime policy"
|
||||
bash scripts/verify-no-legacy-runtime.sh
|
||||
|
||||
echo "==> Checking shell scripts"
|
||||
if LC_ALL=C grep -n $'\r' start.sh >/dev/null 2>&1; then
|
||||
echo "ERROR: start.sh contains CR/CRLF line endings" >&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x start.sh fix-port.sh
|
||||
chmod +x start.sh fix-port.sh scripts/verify-no-legacy-runtime.sh
|
||||
bash -n start.sh
|
||||
bash -n fix-port.sh
|
||||
if command -v shellcheck >/dev/null 2>&1; then shellcheck start.sh fix-port.sh; fi
|
||||
bash -n scripts/verify-no-legacy-runtime.sh
|
||||
if command -v shellcheck >/dev/null 2>&1; then
|
||||
shellcheck start.sh fix-port.sh scripts/verify-no-legacy-runtime.sh
|
||||
fi
|
||||
|
||||
command -v dotnet >/dev/null 2>&1 || { echo "ERROR: dotnet SDK is required" >&2; exit 1; }
|
||||
dotnet --info
|
||||
|
||||
Reference in New Issue
Block a user