-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (38 loc) · 846 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
# Get the git commit
GIT_COMMIT := $(git rev-parse HEAD)
GIT_DIRTY := $(test -n `git status --porcelain`" && echo "+CHANGES" || true)
#GIT_DIRTY := ""
.DEFAULT_GOAL := build
fmt:
go fmt ./...
.PHONY:fmt
lint: fmt
golint ./...
.PHONY:lint
vet: fmt
go vet ./...
.PHONY:vet
bootstrap:
go get github.com/mitchellh/gox
go generate -tags tools tools/tools.go
.PHONY:bootstrap
buildq:
go build -ldflags "-s -w" .
.PHONY:buildq
buildlq:
gox -osarch "linux/amd64" \
-gocmd go \
-mod vendor \
-ldflags "-s -w" \
-tags "fspop" \
-output fspop .
.PHONY:buildlq
build: vet
gox -osarch "darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm linux/arm64 windows/386 windows/amd64" \
-gocmd go \
-mod vendor \
-ldflags "-s -w" \
-tags "fspop" \
-output "pkg/{{.OS}}_{{.Arch}}/fspop" \
.
.PHONY:build