Skip to content

Commit 1393f40

Browse files
makefile: minor fixes needed to match planned tagging format
We want the makefile to help us embed the version and hash of the git checkout used for the build. Fix getting the hash when a tag is applied and when the tag is in the form vX.Y (rather than vX.Y.Z). Signed-off-by: John Mulligan <jmulligan@redhat.com>
1 parent d167a74 commit 1393f40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ BUNDLE_DEFAULT_CHANNEL:=--default-channel=$(DEFAULT_CHANNEL)
1414
endif
1515
BUNDLE_METADATA_OPTS?=$(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
1616

17-
COMMIT_ID=$(shell git describe --abbrev=40 --always --dirty=+ 2>/dev/null)
18-
GIT_VERSION=$(shell git describe --match='v[0-9]*.[0-9].[0-9]' 2>/dev/null || echo "(unset)")
17+
COMMIT_ID=$(shell git describe --abbrev=40 --always --exclude='*' --dirty=+ 2>/dev/null)
18+
GIT_VERSION=$(shell git describe --match='v[0-9]*.[0-9]' --match='v[0-9]*.[0-9].[0-9]' 2>/dev/null || echo "(unset)")
1919

2020
CONFIG_KUST_DIR:=config/default
2121
CRD_KUST_DIR:=config/crd

0 commit comments

Comments
 (0)