4 import debian.changelog
7 parser = argparse.ArgumentParser()
8 parser.add_argument('--version', required=True)
9 args = parser.parse_args()
11 with open('debian/changelog', 'r') as f:
12 changelog = debian.changelog.Changelog(f)
13 # Remove the placeholder entry for the next release
14 changelog._blocks = changelog._blocks[1:]
15 changelog_minus_first_entry = changelog
17 with open('debian/changelog', 'w') as f:
18 f.write(subprocess.check_output(
19 ['bin/generate-changelog', '--version', args.version]
21 changelog_minus_first_entry.write_to_open_file(f)