ensure_web_installed
This commit is contained in:
parent
6b306f0849
commit
d468108188
5 changed files with 11 additions and 4 deletions
|
@ -33,6 +33,13 @@ function ensure_venv {
|
||||||
python -c 'print()' > /dev/null || die "Python ve venvu je rozbitý. Prosím smaž venv a zkus to znovu."
|
python -c 'print()' > /dev/null || die "Python ve venvu je rozbitý. Prosím smaž venv a zkus to znovu."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ensure_web_installed {
|
||||||
|
ensure_venv
|
||||||
|
python -c 'import django; print(django.__version__)' > /dev/null && return
|
||||||
|
echo >&2 "POZOR: Web nevypadá nainstalovaně, instaluji."
|
||||||
|
make/install_web
|
||||||
|
}
|
||||||
|
|
||||||
function gimli_only {
|
function gimli_only {
|
||||||
# Rovnou zkontrolujeme i uživatele
|
# Rovnou zkontrolujeme i uživatele
|
||||||
if test "$HOSTNAME" != gimli -o "$USER" != mam-web
|
if test "$HOSTNAME" != gimli -o "$USER" != mam-web
|
||||||
|
|
2
make/run
2
make/run
|
@ -3,6 +3,6 @@
|
||||||
set -exuo pipefail
|
set -exuo pipefail
|
||||||
. make/lib.sh
|
. make/lib.sh
|
||||||
|
|
||||||
ensure_venv
|
ensure_web_installed
|
||||||
|
|
||||||
./manage.py runserver "$@"
|
./manage.py runserver "$@"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -exuo pipefail
|
set -exuo pipefail
|
||||||
. make/lib.sh
|
. make/lib.sh
|
||||||
|
|
||||||
ensure_venv
|
ensure_web_installed
|
||||||
|
|
||||||
./manage.py graph_models seminar | dot -Tpdf > schema_seminar.pdf
|
./manage.py graph_models seminar | dot -Tpdf > schema_seminar.pdf
|
||||||
./manage.py graph_models -a -g | dot -Tpdf > schema_all.pdf
|
./manage.py graph_models -a -g | dot -Tpdf > schema_all.pdf
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -exuo pipefail
|
set -exuo pipefail
|
||||||
. make/lib.sh
|
. make/lib.sh
|
||||||
|
|
||||||
ensure_venv
|
ensure_web_installed
|
||||||
|
|
||||||
# TODO: This is very ugly, will fix in a future PR (hopefully)
|
# TODO: This is very ugly, will fix in a future PR (hopefully)
|
||||||
ssh "$GIMLI_LOGIN" "
|
ssh "$GIMLI_LOGIN" "
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -exuo pipefail
|
set -exuo pipefail
|
||||||
. make/lib.sh
|
. make/lib.sh
|
||||||
|
|
||||||
ensure_venv
|
ensure_web_installed
|
||||||
|
|
||||||
trap - ERR # Testy nejspíš selžou, ale nechceme kolem toho dělat další chybovou hlášku.
|
trap - ERR # Testy nejspíš selžou, ale nechceme kolem toho dělat další chybovou hlášku.
|
||||||
./manage.py test -v2
|
./manage.py test -v2
|
||||||
|
|
Loading…
Reference in a new issue