mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 12:41:09 +00:00
Better error message with permissions problems
This commit is contained in:
10
pre-push.sh
10
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:
|
||||
|
||||
Reference in New Issue
Block a user