chore: clean up web ui repo hygiene
This commit is contained in:
parent
94e62c9456
commit
2fcc9db903
4786 changed files with 1271 additions and 1275231 deletions
34
.githooks/pre-commit
Executable file
34
.githooks/pre-commit
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(git rev-parse --show-toplevel)"
|
||||
cd "${repo_root}"
|
||||
|
||||
mapfile -t staged_files < <(git diff --cached --name-only --diff-filter=ACMR)
|
||||
if [[ ${#staged_files[@]} -eq 0 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
run_backend=false
|
||||
run_frontend=false
|
||||
|
||||
for file in "${staged_files[@]}"; do
|
||||
case "${file}" in
|
||||
app.py|supertonic_gateway.py|voice_rtc.py|wisper.py|requirements.txt|.ruff.toml|scripts/check_python_quality.sh)
|
||||
run_backend=true
|
||||
;;
|
||||
frontend/*|scripts/check_frontend_quality.sh)
|
||||
run_frontend=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "${run_backend}" == "true" ]]; then
|
||||
echo "Running backend Python checks..."
|
||||
./scripts/check_python_quality.sh
|
||||
fi
|
||||
|
||||
if [[ "${run_frontend}" == "true" ]]; then
|
||||
echo "Running frontend checks..."
|
||||
./scripts/check_frontend_quality.sh
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue