mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 18:16:57 +02:00
Merge pull request #3760 from cgroschupp/change-version-command
use only tags with prefix v for version determination
This commit is contained in:
commit
92824f4f9b
2
Makefile
2
Makefile
@ -87,7 +87,7 @@ BINARY ?= external-dns
|
|||||||
SOURCES = $(shell find . -name '*.go')
|
SOURCES = $(shell find . -name '*.go')
|
||||||
IMAGE_STAGING = gcr.io/k8s-staging-external-dns/$(BINARY)
|
IMAGE_STAGING = gcr.io/k8s-staging-external-dns/$(BINARY)
|
||||||
IMAGE ?= us.gcr.io/k8s-artifacts-prod/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
|
BUILD_FLAGS ?= -v
|
||||||
LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s
|
LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s
|
||||||
ARCHS = amd64 arm64 arm/v7
|
ARCHS = amd64 arm64 arm/v7
|
||||||
|
@ -9,7 +9,7 @@ function generate_changelog {
|
|||||||
# current tag is a full release
|
# current tag is a full release
|
||||||
previous_tag=""
|
previous_tag=""
|
||||||
while [[ -z $previous_tag || ( $previous_tag == *-* && $current_tag != *-* ) ]]; do
|
while [[ -z $previous_tag || ( $previous_tag == *-* && $current_tag != *-* ) ]]; do
|
||||||
previous_tag="$(git describe --tags "$start_ref"^ --abbrev=0)"
|
previous_tag="$(git describe --tags "$start_ref"^ --abbrev=0 --match "v*")"
|
||||||
start_ref="$previous_tag"
|
start_ref="$previous_tag"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -10,4 +10,4 @@ chmod +x trivy
|
|||||||
|
|
||||||
# run trivy
|
# run trivy
|
||||||
cd -
|
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*")
|
||||||
|
Loading…
Reference in New Issue
Block a user