release tools
This synchronizes the build rules with other repos and (as part of that) bumps the Go version to 1.11.1. The recommended formatting changed slightly in that Go version.
This commit is contained in:
34
Makefile
34
Makefile
@@ -14,34 +14,6 @@
|
||||
|
||||
.PHONY: all csi-snapshotter clean test
|
||||
|
||||
REGISTRY_NAME=quay.io/k8scsi
|
||||
IMAGE_NAME=csi-snapshotter
|
||||
IMAGE_VERSION=canary
|
||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
||||
|
||||
REV=$(shell git describe --long --tags --match='v*' --dirty)
|
||||
|
||||
ifdef V
|
||||
TESTARGS = -v -args -alsologtostderr -v 5
|
||||
else
|
||||
TESTARGS =
|
||||
endif
|
||||
|
||||
all: csi-snapshotter
|
||||
|
||||
csi-snapshotter:
|
||||
mkdir -p bin
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/csi-snapshotter ./cmd/csi-snapshotter
|
||||
|
||||
clean:
|
||||
-rm -rf bin
|
||||
|
||||
container: csi-snapshotter
|
||||
docker build -t $(IMAGE_TAG) .
|
||||
|
||||
push: container
|
||||
docker push $(IMAGE_TAG)
|
||||
|
||||
test:
|
||||
go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
|
||||
go vet `go list ./... | grep -v vendor`
|
||||
CMDS=csi-snapshotter
|
||||
all: build
|
||||
include release-tools/build.make
|
||||
|
Reference in New Issue
Block a user