-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
101 lines (68 loc) · 2.33 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
SERVICES=account content-publishing content-watcher graph libs
DOCKER_SERVICES=account content-publishing content-watcher graph
BUILD_TARGETS=$(SERVICES:%=build-%)
TEST_TARGETS=$(SERVICES:%=test-%)
E2E_TARGETS=$(SERVICES:%=test-e2e-%)
K6_TARGETS=$(SERVICES:%=test-k6-%)
DOCKER_BUILD_TARGETS=$(DOCKER_SERVICES:%=docker-build-%)
.PHONY: build test test-e2e lint format docker-build $(TEST_TARGETS) $(E2E_TARGETS) $(DOCKER_BUILD_TARGETS)
deps:
@npm ci
update-packages:
@npm i
build:
@npm run build
generate-metadata:
@npm run generate:metadata
generate-openapi:
@npm run generate:openapi
generate-swagger-ui:
@npm run generate:swagger-ui
.PHONY test: $(TEST_TARGETS)
test-e2e: $(E2E_TARGETS)
# test-k6: $(K6_TARGETS)
lint:
@npm run lint
format:
@npm run format
docker-build: $(DOCKER_BUILD_TARGETS)
$(BUILD_TARGETS): build-%: deps
@npm run build:$(@:build-%=%)
$(METADATA_TARGETS): metadata-%: deps
@npm run generate:metadata:$(@:metadata-%=%)
$(OPENAPI_TARGETS): openapi-%: deps
@npm run generate:openapi:$(@:openapi-%=%)
$(SWAGGER_TARGETS): swagger-%: openapi-%
@npm run generate:swagger-ui:$(@:swagger-%=%)
$(TEST_TARGETS):
@npm run test:$(@:test-%=%)
$(E2E_TARGETS):
@npm run test:e2e:$(@:test-e2e-%=%)
# $(K6_TARGETS):
# @( cd apps/$(@:test-k6-%=%) ; npm run test:k6 )
$(DOCKER_BUILD_TARGETS):
@docker build -t $(@:docker-build-%=%)-service -f Docker/Dockerfile.$(@:docker-build-%=%) .
docker-build: $(DOCKER_BUILD_TARGETS)
start-account-api: update-packages
@npm run start:account-api:watch
start-account-worker: update-packages
@npm run start:account-worker:watch
start-content-publishing-api: update-packages
@npm run start:content-publishing-api:watch
start-content-publishing-worker: update-packages
@npm run start:content-publishing-worker:watch
start-content-watcher: update-packages
@npm run start:content-watcher:watch
start-graph-api: update-packages
@npm run start:graph-api:watch
start-graph-worker: update-packages
@npm run start:graph-worker:watch
.PHONY: setup-account
setup-account:
@cd apps/account-api/test/setup && npm install && npm run main
.PHONY: test-content-watcher-services-start
test-content-watcher-services-start:
@scripts/content-watcher/local-setup.sh -n cw-e2e -i
.PHONY: test-content-watcher-services-stop
test-content-watcher-services-stop:
@scripts/content-watcher/local-setup.sh -n cw-e2e -d