-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
61 lines (50 loc) · 2.43 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
.PHONY: help
help:
@echo "--------------------------------------------------------------------"
@echo " Memories "
@echo " web and mobile app for social networking "
@echo " focusing on sharing past memories with other users worldwide "
@echo "--------------------------------------------------------------------"
@echo " This Makefile assumes you have Docker and Docker Compose "
@echo "--------------------------------------------------------------------"
@echo " targets: up, down, env-files, pre-commit, help "
@echo "--------------------------------------------------------------------"
@echo " Local system up: "
@echo " > make up; "
@echo " > make compose-up; "
@echo " Local system down: "
@echo " > make down; "
@echo " > make compose-down; "
@echo " Local environment files: "
@echo " > make env-files; "
@echo " Run pre-commit for all files: "
@echo " > make pre-commit; "
@echo " Help: "
@echo " > make; "
@echo " > make help; "
@echo "--------------------------------------------------------------------"
env-files:
ifeq ($(OS),Windows_NT)
powershell ./hack/env-files.ps1
else
./hack/env-files.sh
endif
compose-up: env-files
docker compose up -d --build
compose-down: env-files
docker compose down --remove-orphans
up: compose-up
down: compose-down
pre-commit:
@pip install -U pre-commit
@pre-commit install
pre-commit run --all-files
git-stats:
git log | git shortlog -sne
backend-test:
docker compose exec -T backend python manage.py test
frontend-test:
docker compose exec -e CI=true -T frontend npm run test -- --coverage --watchAll=false
local-frontend: down
docker compose up db backend -d --build
cd ./backend/frontend && npm install && npm run start