0c5c2d
From 6ead0462968aa5ef798c8455e0ce30c8efbaad4d Mon Sep 17 00:00:00 2001
0c5c2d
From: Julius Milan <jmilan@redhat.com>
0c5c2d
Date: Thu, 2 Nov 2017 09:27:04 +0100
0c5c2d
Subject: [PATCH 01/22] makefile: fix make release
0c5c2d
0c5c2d
make release-* commands failed to update changelog in spec when it
0c5c2d
contained more than one "changelog" string
0c5c2d
---
0c5c2d
 Makefile.am | 2 +-
0c5c2d
 1 file changed, 1 insertion(+), 1 deletion(-)
0c5c2d
0c5c2d
diff --git a/Makefile.am b/Makefile.am
0c5c2d
index f7f9c1a6..9ad827c6 100644
0c5c2d
--- a/Makefile.am
0c5c2d
+++ b/Makefile.am
0c5c2d
@@ -74,7 +74,7 @@ release:
0c5c2d
 	maint/pull-translations; \
0c5c2d
 	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; \
0c5c2d
 	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; \
0c5c2d
-	sed "$$(grep -n changelog libreport.spec.in | cut -f1 -d:)"'r /tmp/changelog.tmp' -i libreport.spec.in; \
0c5c2d
+	sed "$$(grep -n %changelog libreport.spec.in | cut -f1 -d: | head -1)"'r /tmp/changelog.tmp' -i libreport.spec.in; \
0c5c2d
 	sed -e "s/^## \[Unreleased\]/## [Unreleased]\n\n## [$$NEW_VER] - $$(date +'%F')/" \
0c5c2d
 	    -e "s/^\[Unreleased\]: \(https:\/\/.*\/compare\)\(\/.*\)\.\.\.HEAD/[Unreleased]: \1\/$$NEW_VER...HEAD\n[$$NEW_VER]: \1\2...$$NEW_VER/" \
0c5c2d
 	    -i CHANGELOG.md; \
0c5c2d
-- 
0c5c2d
2.14.3
0c5c2d