Skip to content

Commit 96a8306

Browse files
committed
Update version in the Makefile
1 parent 4fa90a4 commit 96a8306

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@ IMAGE_NAME=csi-snapshotter
1919
IMAGE_VERSION=canary
2020
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
2121

22+
REV=$(shell git describe --long --tags --match='v*' --dirty)
23+
2224
ifdef V
2325
TESTARGS = -v -args -alsologtostderr -v 5
2426
else
2527
TESTARGS =
2628
endif
2729

28-
2930
all: csi-snapshotter
3031

3132
csi-snapshotter:
3233
mkdir -p bin
33-
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./bin/csi-snapshotter ./cmd/csi-snapshotter
34+
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/csi-snapshotter ./cmd/csi-snapshotter
3435

3536
clean:
3637
-rm -rf bin

0 commit comments

Comments
 (0)