-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
52 lines (40 loc) · 1.52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: install help watch_sass sass load_fixtures migrate server create_admin
help:
@echo 'install: install dependencies'
@echo 'test: run tests'
@echo 'create_admin: create a superuser (admin)'
@echo 'encode_gcloud_credentials'
@echo 'load_fixtures: load database fixtures'
@echo 'migrate: migrate database'
@echo 'sass: compile styles'
@echo 'server: start server'
@echo 'watch_sass: watch changes and compile'
@echo 'make_translations: regenerate translation files'
@echo 'compile_translations: compile translation files'
@echo 'setup_bucket_policy: applies bucket-policy.json policy to s3://queremosaber'
install:
poetry install --no-root
poetry run pre-commit install
test:
poetry run pytest
poetry run pre-commit run --all-files
watch_sass: sass
poetry run watchmedo shell-command --patterns="*.scss" --recursive --command 'make sass' web/static/web/styles
sass:
poetry run pysassc web/static/web/styles/main.scss web/static/web/styles/main.css --sourcemap
load_fixtures:
poetry run python manage.py loaddata public_bodies_and_esics sample_foi_requests
migrate:
poetry run python manage.py migrate
server:
poetry run honcho -f Procfile.dev start
create_admin:
poetry run python manage.py createsuperuser
make_translations:
poetry run django-admin makemessages --all --ignore "env*"
compile_translations:
# FIXME: This will compile all .po files in the current folder, including in
# `.tox` and `env`
poetry run django-admin compilemessages
setup_bucket_policy:
s3cmd setpolicy bucket-policy.json s3://queremossaber