diff --git a/Makefile b/Makefile index 500fea06a6..f077f317d3 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ BINARY ?= external-dns SOURCES = $(shell find . -name '*.go') IMAGE_STAGING = gcr.io/k8s-staging-external-dns/$(BINARY) IMAGE ?= us.gcr.io/k8s-artifacts-prod/external-dns/$(BINARY) -VERSION ?= $(shell git describe --tags --always --dirty) +VERSION ?= $(shell git describe --tags --always --dirty --match "v*") BUILD_FLAGS ?= -v LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s ARCHS = amd64 arm64 arm/v7 diff --git a/scripts/run-trivy.sh b/scripts/run-trivy.sh index b84dad1705..2fe482e663 100755 --- a/scripts/run-trivy.sh +++ b/scripts/run-trivy.sh @@ -10,4 +10,4 @@ chmod +x trivy # run trivy cd - -/tmp/trivy image --exit-code 1 us.gcr.io/k8s-artifacts-prod/external-dns/external-dns:$(git describe --tags --always --dirty) +/tmp/trivy image --exit-code 1 us.gcr.io/k8s-artifacts-prod/external-dns/external-dns:$(git describe --tags --always --dirty --match "v*)