-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (48 loc) · 1.13 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
.DEFAULT_GOAL := build
.ONESHELL:
.PHONY: test
PG_USER := postgres
PG_PASS := postgres
define JSON_TODO
curl -X 'POST' \
'http://localhost:8080/todo' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"done": true,
"title": "string"
}'
endef
export JSON_TODO
# Helper
todo:
@echo $$JSON_TODO | bash
list:
@curl -X 'GET' 'http://localhost:8080/todo' -H 'accept: */*' | jq .
open-swagger:
open http://localhost:8080/swagger/index.html
open-signoz:
open http://localhost:3301
# Test
hurl-todo:
@hurl --color --test hurl/todo.hurl
hurl-id:
@hurl --color --test hurl/id.hurl
slumber:
@slumber ./slumber.yml
# Modules
ifneq (,$(findstring id,$(MAKECMDGOALS)))
-include id-service-gin-signoz/Makefile
endif
ifneq (,$(findstring todo,$(MAKECMDGOALS)))
-include todo-service-gin-signoz/Makefile
endif
ifneq (,$(findstring infra,$(MAKECMDGOALS)))
-include infrastructure/Makefile
endif
install:
go install braces.dev/errtrace/cmd/errtrace@latest
go install golang.org/x/tools/cmd/deadcode@latest
go install github.com/swaggo/swag/cmd/swag@latest
go install github.com/kisielk/godepgraph@latest