]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
and include AGAIN .. why does it disappear?
authorMathias Klette <mathias.klette@profitbricks.com>
Tue, 7 May 2013 15:56:31 +0000 (17:56 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 7 May 2013 15:56:31 +0000 (17:56 +0200)
debian_build.py

index fa55119212094b8c9c8ddcd79d477644cb3b8854..47f6ebc85382d97c1415b30273e4f2a0d4206adb 100755 (executable)
@@ -331,12 +331,11 @@ if __name__ == '__main__':
 
 
     # let me see the first two changelog entries:
-    line_counter = 0
-    for line in fileinput.input('debian/changelog'):
-        if line.startswith(' --'):
-            line_counter += 1
-        if line_counter <= 2:
-            print('debian/changelog: %s' %(line.rstrip('\n')))
+    # TODO: use changelog python libs instead of DCH calls, see above
+    cl = changelog.Changelog()
+    cl.parse_changelog(open('debian/changelog'))
+    logger.info('New changelog:\n\n%s' %(
+            ''.join([block.__str__() for block in cl._blocks[0:2]])))
 
 
     # ACT IV: preparations are set, let's build