From dcd08b278fe366e43decbf1c1029f979985cb37b Mon Sep 17 00:00:00 2001 From: Renato Botelho do Couto Date: Tue, 8 Mar 2022 15:40:49 -0300 Subject: [PATCH] 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 --- build/external/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.16.6