-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.28 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
BINARY_NAME=orunmila
SOURCE=./...
.PHONY: all
all: dep test test_coverage vet build
build:
GOARCH=amd64 GOOS=linux go build -o ${BINARY_NAME} ${SOURCE}
releases:
GOARCH=amd64 GOOS=darwin go build -o ${BINARY_NAME}-darwin ${SOURCE}
GOARCH=amd64 GOOS=linux go build -o ${BINARY_NAME}-linux ${SOURCE}
GOARCH=amd64 GOOS=windows go build -o ${BINARY_NAME}-windows.exe ${SOURCE}
GOARCH=amd64 GOOS=openbsd go build -o ${BINARY_NAME}-openbsd ${SOURCE}
GOARCH=arm64 GOOS=linux go build -o ${BINARY_NAME}-linux-arm64 ${SOURCE}
GOARCH=arm64 GOOS=openbsd go build -o ${BINARY_NAME}-openbsd-arm64 ${SOURCE}
test:
go test ${SOURCE} -test.v
test_coverage:
go test ${SOURCE} -coverprofile=coverage.out
dep:
-@CGO_ENABLED=1 GO111MODULE=on go mod download
vet:
go vet
#lint:
# golangci-lint run --enable-all
run:
./${BINARY_NAME}
cleandb:
-@rm ${BINARY_NAME}.db ${BINARY_NAME}.db-journal
clean:
-go clean
-@rm coverage.out
-@rm ${BINARY_NAME}-darwin-amd64
-@rm ${BINARY_NAME}-linux-amd64
-@rm ${BINARY_NAME}-windows-amd64.exe
-@rm ${BINARY_NAME}-openbsd-amd64
-@rm ${BINARY_NAME}-linux-arm64
-@rm ${BINARY_NAME}-openbsd-arm64
-@rm ${BINARY_NAME}-darwin
-@rm ${BINARY_NAME}-linux
-@rm ${BINARY_NAME}-windows.exe
-@rm ${BINARY_NAME}-openbsd