summaryrefslogtreecommitdiffstats
path: root/pre-push.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pre-push.sh')
-rwxr-xr-x[-rw-r--r--]pre-push.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/pre-push.sh b/pre-push.sh
index c93fff5..c2637b6 100644..100755
--- a/pre-push.sh
+++ b/pre-push.sh
@@ -1,12 +1,16 @@
-#! /bin/sh
+#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
echo "** This copies file to _deploy/wsl/ !"
-echo
+cd ..
+source .venv/bin/activate
+cd troggle
+echo `pwd`
echo deprecations.
+
python -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
echo diffsettings.
rm diffsettings.txt
@@ -15,8 +19,8 @@ if test -f "diffsettings.txt"; then
exit
fi
python manage.py diffsettings | grep "###" > diffsettings.txt
-echo pip freeze.
-pip freeze > requirements.txt
+echo uv pip freeze.
+uv pip freeze > requirements.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
python manage.py inspectdb > troggle-inspectdb.py
@@ -41,6 +45,7 @@ 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
+deactivate
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh