Blob Blame Raw
From 6ead0462968aa5ef798c8455e0ce30c8efbaad4d Mon Sep 17 00:00:00 2001
From: Julius Milan <jmilan@redhat.com>
Date: Thu, 2 Nov 2017 09:27:04 +0100
Subject: [PATCH 01/22] makefile: fix make release

make release-* commands failed to update changelog in spec when it
contained more than one "changelog" string
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index f7f9c1a6..9ad827c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,7 +74,7 @@ release:
 	maint/pull-translations; \
 	echo "* $$(LANG='en_US.UTF-8' date +'%a %b %d %Y') $$(git config --get user.name) <$$(git config --get user.email)> $$NEW_VER-1" | sort > /tmp/changelog.tmp; \
 	git log --oneline $$OLD_VER..HEAD | awk '{$$1=""; if (a[$$0]++ == 0) print "-" $$0} END {print ""}' | grep -v -e "- Merge" -e "- testsuite:" -e "- make:" >> /tmp/changelog.tmp; \
-	sed "$$(grep -n changelog libreport.spec.in | cut -f1 -d:)"'r /tmp/changelog.tmp' -i libreport.spec.in; \
+	sed "$$(grep -n %changelog libreport.spec.in | cut -f1 -d: | head -1)"'r /tmp/changelog.tmp' -i libreport.spec.in; \
 	sed -e "s/^## \[Unreleased\]/## [Unreleased]\n\n## [$$NEW_VER] - $$(date +'%F')/" \
 	    -e "s/^\[Unreleased\]: \(https:\/\/.*\/compare\)\(\/.*\)\.\.\.HEAD/[Unreleased]: \1\/$$NEW_VER...HEAD\n[$$NEW_VER]: \1\2...$$NEW_VER/" \
 	    -i CHANGELOG.md; \
-- 
2.14.3