-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 1.17 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
VERSION := $(shell git describe --always --long --dirty)
DATE := $(shell date +%s)
LDFLAGS := -ldflags="-X github.com/ambientsound/visp/version.Version=${VERSION} -X github.com/ambientsound/visp/version.buildDate=${DATE}"
.PHONY: visp test linux-amd64 darwin-amd64 windows-amd64
visp:
go build ${LDFLAGS} -o bin/visp cmd/visp/main.go
visp-authproxy:
go build ${LDFLAGS} -o bin/visp-authproxy cmd/visp-authproxy/main.go
test:
go test ./...
test-coverage:
go test -coverprofile=cover.out ./...
mocks:
mockery --all --inpackage --case underscore --dir api/
linux-amd64:
GOOS=linux GOARCH=amd64 \
go build ${LDFLAGS} -o bin/visp-linux-amd64 cmd/visp/main.go
linux-arm64:
GOOS=linux GOARCH=arm64 \
go build ${LDFLAGS} -o bin/visp-linux-arm64 cmd/visp/main.go
linux-arm:
GOOS=linux GOARCH=arm \
go build ${LDFLAGS} -o bin/visp-linux-arm cmd/visp/main.go
darwin-amd64:
GOOS=darwin GOARCH=amd64 \
go build ${LDFLAGS} -o bin/visp-darwin-amd64 cmd/visp/main.go
darwin-arm64:
GOOS=darwin GOARCH=arm64 \
go build ${LDFLAGS} -o bin/visp-darwin-arm64 cmd/visp/main.go
windows-amd64.exe:
GOOS=windows GOARCH=amd64 \
go build ${LDFLAGS} -o bin/visp-windows-amd64.exe cmd/visp/main.go