From 23fe851d4d37a3f3ecb1172ca1dbdc2d197d414c Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Thu, 5 Mar 2020 19:33:41 +0100 Subject: [PATCH] Makefile: use spec file from HEAD to make rpm The spec file in the current working directory might have changes. When building rpms with the commit hash in the version, they ought to be built with the spec file from that hash as well. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9a7116f4..8516ef6e6 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ RPM_TARBALL=rpmbuild/SOURCES/osbuild-composer-$(COMMIT).tar.gz $(RPM_SPECFILE): mkdir -p $(CURDIR)/rpmbuild/SPECS - echo "%global commit $(COMMIT)" | cat - golang-github-osbuild-composer.spec > $(RPM_SPECFILE) + (echo "%global commit $(COMMIT)"; git show HEAD:golang-github-osbuild-composer.spec) > $(RPM_SPECFILE) $(RPM_TARBALL): mkdir -p $(CURDIR)/rpmbuild/SOURCES