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.
This commit is contained in:
Ondřej Budai 2020-04-29 10:43:46 +02:00
parent 75dd7886e4
commit 3f9e5e1e35

View file

@ -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))
#