]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
only display first 2 changelog entries
authorHolger Levsen <holger@layer-acht.org>
Thu, 6 Sep 2012 16:23:35 +0000 (18:23 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 6 Sep 2012 16:23:35 +0000 (18:23 +0200)
debian_build.py

index 5d8cbd03ec1eff9af5ce84f18e95299ec6456a43..75f7967c5ecf214884fa496c059b6e3c3b03f96f 100755 (executable)
@@ -469,9 +469,13 @@ if __name__ == '__main__':
     cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
     subprocess.check_call(cmd)
 
-    # let me see the whole changelog now:
+    # let me see the first two changelog entries:
+    counter=0
     for line in fileinput.input('debian/changelog'):
-        print('debian/changelog: %s' %(line.strip()))
+        if line.startswith(' --'):
+            counter+=1
+        if counter<3:
+            print('debian/changelog: %s' %(line.strip()))
 
     # set pb_suite which GitBuildPackage() will turn into PB_SUITE
     # if we wrote a changelog entry, use that one