diff options
Diffstat (limited to 'pre-push.sh')
-rwxr-xr-x | pre-push.sh | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/pre-push.sh b/pre-push.sh index 788b46f..fe6fb0b 100755 --- a/pre-push.sh +++ b/pre-push.sh @@ -6,24 +6,27 @@ # Philip Sargent 2022/04/12 echo "** This copies file to _deploy/wsl/ !" cd .. -source .venv/bin/activate + cd troggle echo `pwd` echo deprecations. -python -Wall manage.py check -v 3 2>deprecations.txt >/dev/null +PYTHON="uv run" + +source .venv/bin/activate +python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null +deactivate echo diffsettings. rm diffsettings.txt if test -f "diffsettings.txt"; then echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.." exit fi -python manage.py diffsettings | grep "###" > diffsettings.txt -echo uv pip freeze. -uv pip freeze > requirements.txt +$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt + echo inspectdb. # this next line requires database setting to be troggle.sqlite: -python manage.py inspectdb > troggle-inspectdb.py +$PYTHON manage.py inspectdb > troggle-inspectdb.py #egrep -in "unable|error" troggle-inspectdb.py echo remove passwords. cp localsettings.py localsettingsWSL.py @@ -46,12 +49,12 @@ echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\ mv _deploy/wsl/localsettingsWSL.py _deploy/wsl/localsettingsWSL.py.bak mv localsettingsWSL.py _deploy/wsl cp *.sh _deploy/wsl -deactivate + # # Do these before final testing, *not* just before pushing: # in ./pre-run.sh -# python reset-django.py -# python manage.py makemigrations -# python manage.py test -# python manage.py inspectdb > troggle-inspectdb.py +# $PYTHON reset-django.py +# $PYTHON manage.py makemigrations +# $PYTHON manage.py test +# $PYTHON manage.py inspectdb > troggle-inspectdb.py # egrep -i "unable|error" troggle-inspectdb.py |