]> sourceware.org Git - systemtap.git/commitdiff
Tweak spin-rawhide script to stop overwriting the changelog
authorLukas Berk <lberk@redhat.com>
Fri, 23 Aug 2013 18:26:54 +0000 (14:26 -0400)
committerLukas Berk <lberk@redhat.com>
Fri, 23 Aug 2013 18:26:54 +0000 (14:26 -0400)
scripts/spin-rawhide - when merging an upstream diff, sometimes the
       changelog can be overwritten, which shouldn't happen
       trim the changelog diffs and their context lines

scripts/spin-rawhide

index d08648d4e185b8ce33a7dc9177380acbcd62ac7c..cc7643d52ea4cb04578c830374d58ac09ed9664f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/bash 
+#!/usr/bin/bash
 
 function determine_apply_diff() {
 
@@ -54,6 +54,15 @@ fedpkg co systemtap
 cd systemtap
 
 git diff systemtap.spec ../systemtap-git/systemtap.spec > ../spec-diff
+
+# We don't need to know the difference in spec changelogs
+# changelogs should only ever grow, make sure we also trim the %changelog
+# context lines as well
+
+sed -i '/\%changelog/,$d' ../spec-diff
+tac ../spec-diff | sed '1,3d' | tac > spec-diff
+mv spec-diff ../spec-diff
+
 if [ -s ../spec-diff ]; then
     cat ../spec-diff
     echo "The above changes will apply to the fedora git tree,"
@@ -89,6 +98,6 @@ echo "Please ensure that you have an up to date fedoraproject SSL certificate, y
 
 fedpkg new-sources systemtap-$CHANGELOG_VERSION-$GIT_VERSION_TAG.tar.gz
 
-fedpkg commit -m "Automated weekly systemtap rawhide release: $GIT_VERSION_TAG" -p 
+fedpkg commit -m "Automated weekly systemtap rawhide release: $GIT_VERSION_TAG" -p
 
 fedpkg build
This page took 0.029607 seconds and 5 git commands to generate.