forked from oVirt/csi-driver
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
40 lines (30 loc) · 798 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
# Image URL to use all building/pushing image targets
IMG ?= quay.io/ovirt/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: verify
go build -o $(BINDIR)/ovirt-csi-driver -ldflags '-X version.Version=$(REV)' github.com/ovirt/csi-driver/cmd/ovirt-csi-driver
.PHONY: verify
verify: fmt vet test
fmt:
hack/verify-gofmt.sh
vet:
hack/verify-govet.sh
.PHONY: 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