-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (44 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
59 lines (44 loc) · 1.89 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z0-9_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
PHONY = build
BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
clean: ## remove development artifacts and working directory
@rm -fr dist '~build' build latest_logs .pytest_cache build latest_logs downloaded_files .tox src/aurora.egg-info
@rm -fr .coverage ~SYNC* junit.xml coverage.xml
@find . -name __pycache__ -o -name .eggs | xargs rm -rf
@find . -name "*.pyc" -o -name "*.min.min.js" -o -name ".DS_Store" -o -name "*.orig" -o -name "*.min.min.js" -o -name "*.min.min.css" -prune | xargs rm -rf
fullclean: ## remove all development artifacts including tox
@rm -rf .act
$(MAKE) clean
lint: ## code lint
pre-commit run --all-files
i18n: ## i18n support
cd src && django-admin makemessages --all --settings=aurora.config.settings -d djangojs --pythonpath=. --ignore=~*
cd src && django-admin makemessages --all --settings=aurora.config.settings --pythonpath=. --ignore=~*
cd src && django-admin compilemessages --settings=aurora.config.settings --pythonpath=. --ignore=~*
git commit -m "Update translations"
create-db:
dropdb -p 5432 --if-exists aurora
dropdb -p 5432 --if-exists aurora_remote
createdb -p 5432 aurora
createdb -p 5432 aurora_remote
reset-db: create-db
./manage.py migrate
build:
rm -f dist/*
uv build
local:
DATABASE_URL=postgres://postgres:@127.0.0.1/aurora python manage.py upgrade
DATABASE_URL=postgres://postgres:@127.0.0.1/aurora python manage.py runserver 127.0.0.1:8000
remote:
DATABASE_URL=postgres://postgres:@127.0.0.1/aurora_remote python manage.py upgrade --organization UNICEF
DATABASE_URL=postgres://postgres:@127.0.0.1/aurora_remote python manage.py runserver 127.0.0.1:8001