2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 10:26:17 +00:00

Better error message with permissions problems

This commit is contained in:
Philip Sargent
2022-04-12 22:42:36 +03:00
parent d29f3030a4
commit ccd386ff4e
3 changed files with 12 additions and 3 deletions

View File

@@ -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: