From 3f9e5e1e359ae8063a3f2cf138ba468f974fb25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Wed, 29 Apr 2020 10:43:46 +0200 Subject: [PATCH] makefile: fix parsing the version from the spec file The .* before the digit group is greedy and it catches the first version digit when the version >= 10. This commit changes the .* to [^[:digit:]]* so it doesn't catch the first digit. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ddb24da4e..d46ddbec3 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ RST2MAN ?= rst2man # pre-fetched but evaluated at time of use. # -VERSION := $(shell (cd "$(SRCDIR)" && grep "^Version:" osbuild-composer.spec | sed 's/.*\([[:digit:]]\+\).*/\1/')) +VERSION := $(shell (cd "$(SRCDIR)" && grep "^Version:" osbuild-composer.spec | sed 's/[^[:digit:]]*\([[:digit:]]\+\).*/\1/')) COMMIT = $(shell (cd "$(SRCDIR)" && git rev-parse HEAD)) #