Fix for issue SPEC-1782
XDS Version is based on git tags and 3 formats are used to tag the same AGL
version, for example: flounder_6.90.0, flounder/6.90.0, tag: 6.90.0.
For time to time (don't know why always reproducible) the "git describe"
command returns the number version/tag (6.90.0) that is expected and
sometimes it's the string version/tag (flounder/6.90.0) that is
problematic.
Change-Id: I9fdbe93cfea917493a8d4e8346a72cc97cf9c5bd
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
# Retrieve git tag/commit to set version & sub-version strings
-GIT_DESC := $(shell git describe --always --tags)
+GIT_DESC := $(shell git describe --always --tags --match "[0-9]*")
VERSION := $(firstword $(subst -, ,$(GIT_DESC)))
ifeq (-,$(findstring -,$(GIT_DESC)))
SUB_VERSION := $(subst $(VERSION)-,,$(GIT_DESC))