summaryrefslogtreecommitdiffstats
path: root/pre-push.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pre-push.sh')
-rw-r--r--pre-push.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/pre-push.sh b/pre-push.sh
index b3c2638..e350e6a 100644
--- a/pre-push.sh
+++ b/pre-push.sh
@@ -1,10 +1,17 @@
#! /bin/sh
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
-# Philip Sargent 2021/10/23
+
+#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 deprecations.
python -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
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 pip freeze.
pip freeze > requirements.txt
@@ -30,6 +37,7 @@ sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localse
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettingsWSL.py
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
#
# Do these before final testing, *not* just before pushing: