mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 19:11:09 +00:00
Use run instead of exec for bw-dev web commands
The issue I had with this initially was the `clean` part, not the `run` part
This commit is contained in:
parent
1aa4530933
commit
514afdc12d
1 changed files with 10 additions and 15 deletions
25
bw-dev
25
bw-dev
|
@ -19,7 +19,6 @@ function clean {
|
||||||
|
|
||||||
function runweb {
|
function runweb {
|
||||||
docker-compose run --rm web "$@"
|
docker-compose run --rm web "$@"
|
||||||
clean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function execdb {
|
function execdb {
|
||||||
|
@ -64,17 +63,16 @@ case "$CMD" in
|
||||||
clean
|
clean
|
||||||
;;
|
;;
|
||||||
makemigrations)
|
makemigrations)
|
||||||
execweb python manage.py makemigrations "$@"
|
runweb python manage.py makemigrations "$@"
|
||||||
;;
|
;;
|
||||||
migrate)
|
migrate)
|
||||||
execweb python manage.py rename_app fedireads bookwyrm
|
runweb python manage.py migrate "$@"
|
||||||
execweb python manage.py migrate "$@"
|
|
||||||
;;
|
;;
|
||||||
bash)
|
bash)
|
||||||
execweb bash
|
runweb bash
|
||||||
;;
|
;;
|
||||||
shell)
|
shell)
|
||||||
execweb python manage.py shell
|
runweb python manage.py shell
|
||||||
;;
|
;;
|
||||||
dbshell)
|
dbshell)
|
||||||
execdb psql -U ${POSTGRES_USER} ${POSTGRES_DB}
|
execdb psql -U ${POSTGRES_USER} ${POSTGRES_DB}
|
||||||
|
@ -83,22 +81,19 @@ case "$CMD" in
|
||||||
docker-compose restart celery_worker
|
docker-compose restart celery_worker
|
||||||
;;
|
;;
|
||||||
test)
|
test)
|
||||||
execweb coverage run --source='.' --omit="*/test*,celerywyrm*,bookwyrm/migrations/*" manage.py test "$@"
|
runweb coverage run --source='.' --omit="*/test*,celerywyrm*,bookwyrm/migrations/*" manage.py test "$@"
|
||||||
;;
|
;;
|
||||||
pytest)
|
pytest)
|
||||||
execweb pytest --no-cov-on-fail "$@"
|
runweb pytest --no-cov-on-fail "$@"
|
||||||
;;
|
|
||||||
test_report)
|
|
||||||
execweb coverage report
|
|
||||||
;;
|
;;
|
||||||
collectstatic)
|
collectstatic)
|
||||||
execweb python manage.py collectstatic --no-input
|
runweb python manage.py collectstatic --no-input
|
||||||
;;
|
;;
|
||||||
makemessages)
|
makemessages)
|
||||||
execweb django-admin makemessages --no-wrap --ignore=venv3 $@
|
runweb django-admin makemessages --no-wrap --ignore=venv3 $@
|
||||||
;;
|
;;
|
||||||
compilemessages)
|
compilemessages)
|
||||||
execweb django-admin compilemessages --ignore venv3 $@
|
runweb django-admin compilemessages --ignore venv3 $@
|
||||||
;;
|
;;
|
||||||
build)
|
build)
|
||||||
docker-compose build
|
docker-compose build
|
||||||
|
@ -110,7 +105,7 @@ case "$CMD" in
|
||||||
makeitblack
|
makeitblack
|
||||||
;;
|
;;
|
||||||
populate_streams)
|
populate_streams)
|
||||||
execweb python manage.py populate_streams
|
runweb python manage.py populate_streams
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, bash, shell, dbshell, restart_celery, test, pytest, test_report, black, populate_feeds"
|
echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, bash, shell, dbshell, restart_celery, test, pytest, test_report, black, populate_feeds"
|
||||||
|
|
Loading…
Reference in a new issue