-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (44 loc) · 974 Bytes
/
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
.PHONY: run.c
run.c:
go run cmd/server/core/main.go
.PHONY: run.v
run.v:
go run cmd/server/visualizer/main.go
.PHONY: build.c
build.c:
go build -v cmd/server/core/main.go
.PHONY: build.v
build.v:
go build -v cmd/server/visualizer/main.go
.PHONY: test.s
test.s:
go test ./... -v -short
.PHONY: tidy
tidy:
go mod tidy
.PHONY: lint
lint:
golangci-lint run -v --tests ./...
.PHONY: w
w:
curl -sS http://localhost:8080/watch -X POST
.PHONY: trend
trend:
curl -sSi http://localhost:8080/trend -X POST \
--data '{"reportKind": "weekAgo"}'
.PHONY: v
v:
curl -sSi http://localhost:8080/visualize -X POST \
--data '{"reportKind": "daily"}'
.PHONY: dr
dr:
docker run -p 127.0.0.1:8080:8080/tcp --rm --mount type=bind,source=$(shell pwd),target=/app --env-file .env --name vis5 visualizer:0.1
.PHONY: db
db:
docker build -f ./Dockerfile.visualizer -t visualizer:0.1 .
.PHONY: de
de:
docker exec -it vis5 bash
.PHONY: dc
dc:
docker cp vis5:/tmp/. ./tmp/