From 0faf38876138555aefaa89609c2e1fd409acafa5 Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Mon, 27 Sep 2021 12:11:23 +0100 Subject: build: Stricter git tag version parsing Only consider git tags that begin with 'v', as these are far more likely to be vpp version tags, and thus parsed by the version script properly. This needed when working with git clone to which additional tags may have been added. eg tags like: upstream/21.06_rc0+20210622 debian/21.06+20210811-1myvendor2 should be ingored, as they will not be parsed correctly. Type: make Change-Id: I7a6d185acd029335abaea5a9dac48839f1397135 Signed-off-by: Nick Brown --- src/scripts/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scripts') diff --git a/src/scripts/version b/src/scripts/version index 455ab760352..f9f3d215641 100755 --- a/src/scripts/version +++ b/src/scripts/version @@ -20,7 +20,7 @@ cd "$path" if [ -f .version ]; then vstring=$(cat .version) else - vstring=$(git describe --long) + vstring=$(git describe --long --match "v*") if [ $? != 0 ]; then exit 1 fi -- cgit 1.2.3-korg