-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
108 lines (69 loc) · 2.42 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#########################
# FRONTEND
#########################
FRONTEND_DIR := frontend
.PHONY: front-install front-start front-build front-test front-coverage front-lint front-visualize-bundle front-sourcemap
front-ci:
cd $(FRONTEND_DIR) && npm ci
front-install:
cd $(FRONTEND_DIR) && npm install
front-start:
cd $(FRONTEND_DIR) && npm run dev
front-build:
cd $(FRONTEND_DIR) && npm run build
front-lint:
cd $(FRONTEND_DIR) && npm run lint
front-test:
cd $(FRONTEND_DIR) && npm run test
front-coverage:
cd $(FRONTEND_DIR) && npm run test:coverage
front-sourcemap:
cd $(FRONTEND_DIR) && npm run build:with-sourcemaps
front-visualize-bundle:
cd $(FRONTEND_DIR) && npx vite-bundle-visualizer
# END FRONTEND
#########################
#########################
# BACKEND
#########################
BACKEND_DIR := backend
BACKEND_CONFIGURATION_FOLDER=$(shell pwd)/infra/configurations/backend/
.PHONY: back-version back-show-dependencies back-assemble back-build back-test back-local back-clean-archi
back-version:
cd $(BACKEND_DIR) && ./gradlew properties | grep -w 'version' | awk -F': ' '{ if ($1 == "version") print $2 }'
back-show-dependencies:
cd $(BACKEND_DIR) && ./gradlew dependencies
back-assemble:
cd $(BACKEND_DIR) && ./gradlew clean assemble
back-build:
cd $(BACKEND_DIR) && ./gradlew clean build
back-test:
cd $(BACKEND_DIR) && ./gradlew test
back-test-coverage:
cd $(BACKEND_DIR) && ./gradlew test jacocoTestReport
back-start-local:
cd $(BACKEND_DIR) && ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(BACKEND_CONFIGURATION_FOLDER)'
back-clean-archi:
cd $(BACKEND_DIR)/tools && ./check-clean-architecture.sh
# END BACKEND
#########################
#########################
# DOCKER
#########################
INFRA_DIR := infra
.PHONY: docker-prune docker-logs-backend
docker-prune:
docker image prune -a
docker-logs-backend:
docker container logs -f backend
.PHONY: docker-build-back docker-restart-back docker-build-front docker-run-local
docker-build-back:
cd $(INFRA_DIR) && docker compose -f docker-compose.local.yml build backend
docker-restart-back:
cd $(INFRA_DIR) && docker compose -f docker-compose.local.yml restart backend
docker-build-front:
cd $(INFRA_DIR) && docker compose -f docker-compose.local.yml build frontend
docker-run-local:
cd $(INFRA_DIR) && docker compose -f docker-compose.local.yml up -d
# END DOCKER
#########################