From: Holger Levsen Date: Thu, 6 Sep 2012 16:23:35 +0000 (+0200) Subject: only display first 2 changelog entries X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d974f95ec92f06cfb13a34f707858b10c77f562e;p=profitbricks%2Fjenkins-build-scripts.git only display first 2 changelog entries --- diff --git a/debian_build.py b/debian_build.py index 5d8cbd0..75f7967 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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