-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (32 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
POSTGRESQL_ADDON_HOST ?= localhost
POSTGRESQL_ADDON_PORT ?= 5432
POSTGRESQL_ADDON_DB ?= communaute
POSTGRESQL_ADDON_USER ?= communaute
POSTGRESQL_ADDON_PASSWORD ?= password
POSTGRESQL_ADDON_URI ?= "postgresql://$(POSTGRESQL_ADDON_USER):$(POSTGRESQL_ADDON_PASSWORD)@$(POSTGRESQL_ADDON_HOST):$(POSTGRESQL_ADDON_PORT)/$(POSTGRESQL_ADDON_DB)"
DJLINT_EXCLUDE ?= lacommunaute/templates/middleware/
# QUALITY ASSURANCE
# ~~~~~~~~~~~~~~~~~
# The following rules can be used to check code quality, import sorting, etc.
# --------------------------------------------------------------------------------------------------
.PHONY: quality fix
quality:
black --check lacommunaute
ruff check lacommunaute
djlint --lint --check lacommunaute --exclude $(DJLINT_EXCLUDE)
fix:
black lacommunaute
ruff check --fix lacommunaute
djlint --reformat lacommunaute
.PHONY: index
index:
INSTANCE_NUMBER=0 \
POSTGRESQL_ADDON_URI=$(POSTGRESQL_ADDON_URI) \
clevercloud/rebuild_index.sh
# DB
.PHONY: resetdb
resetdb:
dropdb --if-exists $(POSTGRESQL_ADDON_DB)
createdb $(POSTGRESQL_ADDON_DB)
python manage.py migrate
python manage.py populate