forked from vas3k/infomate.club
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.46 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
53
54
55
56
57
58
59
60
61
62
# Set the default goal if no targets were specified on the command line
.DEFAULT_GOAL = run
# Makes shell non-interactive and exit on any error
.SHELLFLAGS = -ec
PROJECT_NAME=infomate
dev-requirements: ## Install dev requirements
@pip3 install -r requirements.txt
docker_run: ## Run dev server in docker
@python3 ./utils/wait_for_postgres.py
@python3 manage.py migrate
@python3 manage.py runserver 0.0.0.0:8000
feed_cleanup: ## Cleanup RSS feeds
@python3 ./scripts/cleanup.py
feed_init: ## Initialize feeds from boards.yml
@python3 ./scripts/initialize.py --config boards.yml --no-upload-favicons -y
feed_refresh: ## Refresh RSS feeds
@python3 ./scripts/update.py
help: ## Display this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[0;32m%-30s\033[0m %s\n", $$1, $$2}'
lint: ## Lint code with flake8
flake8 $(PROJECT_NAME)
migrate: ## Migrate database to the latest version
@python3 manage.py migrate
mypy: ## Check types with mypy
mypy $(PROJECT_NAME)
run: ## Runs dev server
@python3 manage.py runserver
telegram:
@python3 setup_telegram.py
test-ci: test-requirements lint mypy ## Run tests (intended for CI usage)
test-requirements: ## Install requirements to run tests
@pip3 install -r ./requirements-test.txt
.PHONY: \
dev-requirements \
docker_run \
feed_cleanup \
feed_init \
feed_refresh \
help \
lint \
migrate \
mypy \
run \
test-ci \
test-requirements