-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (31 loc) · 833 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
# Image URL to use all building/pushing image targets
IMG ?= quay.io/kubevirt/csi-driver:latest
BINDIR=bin
#BINDATA=$(BINDIR)/go-bindata
BINDATA=go-bindata
REV=$(shell git describe --long --tags --match='v*' --always --dirty)
all: build
# Run tests
.PHONY: test
test:
go test ./pkg/... ./cmd/... -coverprofile cover.out
# Build the binary
.PHONY: build
build:
GOOS="linux" GOARCH="amd64" go build -o $(BINDIR)/kubevirt-csi-driver -ldflags '-X version.Version=$(REV)' github.com/kubevirt/csi-driver/cmd/kubevirt-csi-driver
.PHONY: verify
verify: fmt vet
fmt:
hack/verify-gofmt.sh
vet:
hack/verify-govet.sh
.PHONY: image
image:
podman build . -f Dockerfile -t ${IMG}
.PHONY: vendor
vendor:
go mod tidy
go mod vendor
go mod verify
$(BINDATA):
go build -o $(BINDATA) ./vendor/github.com/jteeuwen/go-bindata/go-bindata