Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use only tags with prefix v for version determination #3760

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/releaser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function generate_changelog {
# current tag is a full release
previous_tag=""
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"
done

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-trivy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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*")