From: Renato Botelho do Couto Date: Tue, 8 Mar 2022 18:40:49 +0000 (-0300) Subject: build: Restrict tag names when discovering version X-Git-Tag: v22.10-rc0~287 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=dcd08b278fe366e43decbf1c1029f979985cb37b;p=vpp.git build: Restrict tag names when discovering version Type: improvement When `make install-ext-deps` is called, it creates a debian changelog file and use `git describe` to fill project version. On downstream consumers it's possible to have different tags that makes it to end up using an invalid version on changelog and breaking the installation process. Restrict tags to be considered by git-describe to match 'v[0-9]*' pattern to get it fixed. Signed-off-by: Renato Botelho do Couto Change-Id: Ieabd7b42ac33735ec4d484bed9039ff20c9872f2 --- diff --git a/build/external/Makefile b/build/external/Makefile index 55443b0c6c9..50d3ed30fa2 100644 --- a/build/external/Makefile +++ b/build/external/Makefile @@ -19,7 +19,7 @@ MAKE ?= make MAKE_ARGS ?= -j BUILD_DIR ?= $(CURDIR)/_build INSTALL_DIR ?= $(CURDIR)/_install -PKG_VERSION ?= $(shell git describe --abbrev=0 | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2) +PKG_VERSION ?= $(shell git describe --abbrev=0 --match 'v[0-9]*' | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2) PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l) JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\ $(shell grep -c ^processor /proc/cpuinfo), 2)