Skip to content

Commit e378abb

Browse files
committed
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: Shachar Sharon <[email protected]>
1 parent e223e1f commit e378abb

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
@@ -5,8 +5,8 @@
55
VERSION?=0.0.1
66

77
# Commit info
8-
COMMIT_ID=$(shell git describe --abbrev=40 --always --dirty=+ 2>/dev/null)
9-
GIT_VERSION=$(shell git describe --match='v[0-9]*.[0-9].[0-9]' 2>/dev/null || echo "(unset)")
8+
COMMIT_ID=$(shell git describe --abbrev=40 --always --exclude='*' --dirty=+ 2>/dev/null)
9+
GIT_VERSION=$(shell git describe --match='v[0-9]*.[0-9]' --match='v[0-9]*.[0-9].[0-9]' 2>/dev/null || echo "(unset)")
1010

1111
GO_CMD:=go
1212
GOFMT_CMD:=gofmt

0 commit comments

Comments
 (0)