Skip to content

Commit

Permalink
change sorting of commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ajib6ept committed Oct 9, 2023
1 parent 811495a commit 1d16ade
Showing 1 changed file with 58 additions and 58 deletions.
116 changes: 58 additions & 58 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,57 @@
install: .env
.env:
test ! -f .env && cp .env.example .env

build-production:
poetry install --extras psycopg2-binary
$(MAKE) collectstatic

build:
poetry install --extras psycopg2-binary
poetry run python manage.py migrate

check: lint test requirements.txt

collectstatic:
poetry run python manage.py collectstatic --no-input

compose-build: .env
docker compose build

compose-clear:
docker compose down -v || true

compose-down:
docker compose down || true

compose-setup: compose-build
docker compose run --rm django make setup

.env:
test ! -f .env && cp .env.example .env
compose-start:
docker compose up --abort-on-container-exit

migrate:
poetry run python manage.py migrate
compose-stop:
docker compose stop || true

build:
poetry install --extras psycopg2-binary
poetry run python manage.py migrate
compose-sync:
docker compose run --rm django make sync ARGS="$(ARGS)"

start-deploy:
gunicorn config.wsgi
deploy:
git push heroku

build-production:
install: .env
poetry install --extras psycopg2-binary
$(MAKE) collectstatic

start-production:
gunicorn -b 0.0.0.0:8000 config.wsgi:application
lint:
poetry run flake8

migrate:
poetry run python manage.py migrate

requirements.txt: poetry.lock
poetry export --format requirements.txt --output requirements.txt --extras psycopg2 --without-hashes

secretkey:
poetry run python -c 'from django.utils.crypto import get_random_string; print(get_random_string(40))'

setup: migrate
echo Create a super user
Expand All @@ -34,60 +60,34 @@ setup: migrate
shell:
poetry run python manage.py shell_plus --plain

# Need to have GNU gettext installed
transprepare:
poetry run django-admin makemessages --locale ru --add-location file
poetry run django-admin makemessages --locale ru --add-location file --domain djangojs
start-deploy:
gunicorn config.wsgi

transcompile:
poetry run django-admin compilemessages
start-production:
gunicorn -b 0.0.0.0:8000 config.wsgi:application

collectstatic:
poetry run python manage.py collectstatic --no-input
start:
poetry run python manage.py runserver 0.0.0.0:8000

lint:
poetry run flake8
sync:
poetry run python manage.py fetchdata $(ARGS)

test:
poetry run coverage run --source='.' manage.py test
test-coverage-report-xml:
poetry run coverage xml

test-coverage-report: test
poetry run coverage report -m $(ARGS)
poetry run coverage erase

test-coverage-report-xml:
poetry run coverage xml

check: lint test requirements.txt

start:
poetry run python manage.py runserver 0.0.0.0:8000

compose-start:
docker compose up --abort-on-container-exit

compose-stop:
docker compose stop || true

compose-down:
docker compose down || true

compose-clear:
docker compose down -v || true

compose-sync:
docker compose run --rm django make sync ARGS="$(ARGS)"

sync:
poetry run python manage.py fetchdata $(ARGS)

secretkey:
poetry run python -c 'from django.utils.crypto import get_random_string; print(get_random_string(40))'
test:
poetry run coverage run --source='.' manage.py test

requirements.txt: poetry.lock
poetry export --format requirements.txt --output requirements.txt --extras psycopg2 --without-hashes
transcompile:
poetry run django-admin compilemessages

deploy:
git push heroku
# Need to have GNU gettext installed
transprepare:
poetry run django-admin makemessages --locale ru --add-location file
poetry run django-admin makemessages --locale ru --add-location file --domain djangojs

.PHONY: install setup shell lint test check start sync secretkey

0 comments on commit 1d16ade

Please sign in to comment.