forked from adfinis/mySAGW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (51 loc) · 1.83 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
63
64
65
66
67
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort -k 1,1 | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: ## Build the development server
@docker-compose build --pull
.PHONY: start
start: ## Start the development server
@docker-compose up -d --build
.PHONY: api-test
api-test: ## Test the backend
@docker-compose run --rm api pytest --no-cov-on-fail --cov --create-db -vv
.PHONY: api-lint
api-lint: ## Lint the backend
@docker-compose run --rm api sh -c "black --check . && flake8"
.PHONY: api-bash
api-bash: ## Shell into the backend
@docker-compose run --rm api bash
.PHONY: api-shell_plus
api-shell_plus: ## Run shell_plus
@docker-compose run --rm api python ./manage.py shell_plus
.PHONY: makemigrations
makemigrations: ## Make django migrations
@docker-compose run --rm api python ./manage.py makemigrations
.PHONY: migrate
migrate: ## Migrate django
@docker-compose run --rm api python ./manage.py migrate
.PHONY: dbshell
dbshell: ## Start a psql shell
@docker-compose exec db psql -Umysagw
.PHONY: caluma-test
caluma-test: ## test caluma config and extensions
@docker-compose exec -T caluma python manage.py check
@docker-compose exec -T caluma ./caluma/ci/test.sh
.PHONY: caluma-lint
caluma-lint: ## lint caluma extensions
@cd ./caluma && black --check .
@cd ./caluma && flake8
.PHONY: caluma-loadconfig
caluma-loadconfig: ## load Caluma config
@docker-compose run --rm caluma ./manage.py loaddata ./caluma/data/config.json
.PHONY: ember-lint
ember-lint: ## lint the frontend
@docker-compose run --rm ember yarn lint
.PHONY: ember-lint-fix
ember-lint-fix: ## lint and fix the frontend
@docker-compose run --rm ember yarn lint:js --fix
.PHONY: ember-test
ember-test: ## test the frontend
@docker-compose run --rm ember yarn test:ember