-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 1.36 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
#EXAMPLE_NAME = sc
#TARGET_LINUX = GOARCH=amd64 GOOS=linux
.PHONY: all
all: test_build test code_qa
.PHONY: test
test:
cd api && go test -covermode=atomic
cd auth && go test -covermode=atomic
cd cli && go test -covermode=atomic
cd config && go test -covermode=atomic
go test -covermode=atomic
.PHONY: code_qa
code_qa:
#go test `go list ./... | grep -v 'hack\|deprecated'` -coverprofile=coverage.txt -covermode=atomic
golangci-lint run > lint.txt
.PHONY: test_build
test_build:
go mod verify && go mod tidy
cd cmd/router && go build main.go && rm main
cd examples/service && go build main.go && rm main
cd examples/cli && go build cli.go && rm cli
cd examples/appengine && go build main.go && rm main
#.PHONY: examples
#examples: example_cli example_service
#.PHONY: example_appengine
#example_appengine:
# cd examples/appengine && gcloud app deploy . --quiet
#.PHONY: example_cli
#example_cli:
# cd examples/cli && go build -o ${EXAMPLE_NAME} cli.go && mv ${EXAMPLE_NAME} ../../bin/${EXAMPLE_NAME}
# chmod +x bin/${EXAMPLE_NAME}
#.PHONY: example_service
#example_service:
# cd examples/service && go build -o svc main.go && mv svc ../../bin/${EXAMPLE_NAME}svc
# chmod +x bin/${EXAMPLE_NAME}svc
#.PHONY example_api_container
#example_api_container:
# cd examples/simple_api && ${TARGET_LINUX} go build -o svc main.go && podman build -t "" .
# rm examples/simple_api/svc