-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 789 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
dc := docker-compose -f build/docker-compose.yaml -p gonv
.PHONY: up
up:
${dc} up -d mysql57
.PHONY: down
down:
${dc} down
.PHONY: clean
clean:
${dc} down --volumes
.PHONY: ps
ps:
${dc} ps
.PHONY: wait
wait:
${dc} run --rm wait
.PHONY: exec-db
exec-db:
${dc} exec mysql57 mysql -uroot -ptest test
.PHONY: logs-db
logs-db:
${dc} logs mysql57
.PHONY: reflect
reflect:
go run . reflect -u root -p test -P 33066 -o build/mysql/schema test
.PHONY: diff
diff:
go run . diff -u root -p test -P 33066 test build/mysql/diff_schema
.PHONY: test
test:
go test -v -race -coverprofile=cover.txt -covermode=atomic ./...
.PHONY: lint
lint:
docker run --rm \
-v ${PWD}:/app \
-w /app \
golangci/golangci-lint:v1.26.0 \
golangci-lint run ./...
.PHONY: fmt
fmt:
go fmt ./...