From: Sebastien Douheret Date: Thu, 18 Oct 2018 19:28:36 +0000 (+0200) Subject: Update command used to extract version from tag X-Git-Tag: guppy_6.99.1~3 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-cli.git;a=commitdiff_plain;h=aabf2c598db74783e62e81e4ca008ce47fe130ba Update command used to extract version from tag 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 --- diff --git a/Makefile b/Makefile index fadc3fe..65dc031 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ TARGET=xds-cli # 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))