-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (52 loc) · 1.46 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
.PHONY: build
build:
go build
#env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/process process/main.go
#chmod +x bin/process
#zip -j bin/process.zip bin/process
#rm bin/process
.PHONY: commitcheck
commitcheck: clean test
.PHONY: clean
clean:
rm -f infratest
rm -f apitest
rm -f ziptest
rm -f testtest
rm -f securitytest
go mod tidy
.PHONY: test
test: | depcheck infratest apitest ziptest testtest securitytest
.PHONY: depcheck
depcheck:
#Uncomment before check in, while offline
#go get -u #Not required with go mod
#TODO: Change most of these to use stamps convention/ hidden files
infratest: infra infra/*.go
cd infra && go test -cover -coverprofile=coverage.out
cd infra && go vet
cd infra && go tool cover -html=coverage.out
@touch $@
apitest: api api/*.go
cd api && go test -cover -coverprofile=coverage.out
cd api && go vet
cd api && go tool cover -html=coverage.out
@touch $@
testtest: test test/*.go
cd test && go test -cover -coverprofile=coverage.out
cd test && go vet
cd test && go tool cover -html=coverage.out
@touch $@
ziptest: ziptools ziptools/*.go
cd ziptools && go test -cover -coverprofile=coverage.out
cd ziptools && go vet
cd ziptools && go tool cover -html=coverage.out
@touch $@
securitytest: security security/*.go
cd security && go test -cover -coverprofile=coverage.out
cd security && go vet
cd security && go tool cover -html=coverage.out
@touch $@
.PHONY: deploy
deploy: clean build
#sls deploy --verbose