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

upgrading scripts to use uv

This commit is contained in:
2024-12-12 01:26:36 +00:00
parent f3235f8b76
commit c401af7bfc
7 changed files with 142 additions and 157 deletions

13
pre-push.sh Normal file → Executable file
View File

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