From d3a2ceb8ce5c703c2c63c304ff6ec76f641fcd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 6 Mar 2017 09:07:14 +0100 Subject: [PATCH] Extract only first version from specfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When tagging a new version, rpm will give us the version twice, one for main package and one for the -utils subpackage. We should only use the first one (they should be the same anyway). Signed-off-by: Lubomír Sedlář --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b47d02b3..55d2aab2 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ .PHONY: all clean doc log test PKGNAME=pungi -VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec) -RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec) +VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec | head -n1) +RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec | head -n1) GITTAG=${PKGNAME}-$(VERSION) PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}"