From 704e8c90b8d7a79468e022adc8be148133b173ed Mon Sep 17 00:00:00 2001 From: "Brett T. Warden" Date: Thu, 5 Dec 2024 17:11:40 -0800 Subject: [PATCH] Cleanup parsing of version from specfile in catchup targets Make sure we only parse %{version} one time while doing a catchup. --- Makefile.common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 7db88d3..1c18b13 100644 --- a/Makefile.common +++ b/Makefile.common @@ -608,8 +608,9 @@ catchup-%: echo "Error: Target commit/tag $${target} not found"; \ exit 1; \ fi; \ - echo "Version: $$(rpm -q --qf '%{VERSION}\n' --specfile $(SPECFILE) | head -1)"; \ - current_tag=$$(git -C results/$(PKG_NAME) tag --list | grep -E "^($(PKG_NAME)-)?v?$$(rpm -q --qf '%{VERSION}\n' --specfile $(SPECFILE) | head -1)$$") || { \ + version=$$(rpm -q --qf '%{VERSION}\n' --specfile $(SPECFILE) | head -1); \ + echo "Version: $${version}"; \ + current_tag=$$(git -C results/$(PKG_NAME) tag --list | grep -E "^($(PKG_NAME)-)?v?$${version}$$") || { \ echo "Error: No tag found for current package version"; \ exit 1; \ }; \