summaryrefslogtreecommitdiffstats
path: root/build/external/Makefile
diff options
context:
space:
mode:
authorRenato Botelho do Couto <renato@netgate.com>2022-03-08 15:40:49 -0300
committerMatthew Smith <mgsmith@netgate.com>2022-03-11 19:13:04 +0000
commitdcd08b278fe366e43decbf1c1029f979985cb37b (patch)
treef30752ed176deb904437b572a5de02b293c1f15f /build/external/Makefile
parent91a46cb1ff8d6f6a699df0b61d8119efdb403655 (diff)
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 <renato@netgate.com> Change-Id: Ieabd7b42ac33735ec4d484bed9039ff20c9872f2
Diffstat (limited to 'build/external/Makefile')
-rw-r--r--build/external/Makefile2
1 files changed, 1 insertions, 1 deletions
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)