1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/python
# This script updates the changelog of an unbuilt maas source package.
# Should be called like:
# ./update_changelog.py <path-to-changelog> <branch_revno> <packaging_revno>
import sys
from debian.changelog import Changelog
if __name__ == "__main__":
args = sys.argv[1:]
ch = Changelog(open(args[0]))
new_version = '%s+%s+%s-%s'
ch.set_version(new_version % (ch.upstream_version,
args[1],
args[2],
ch.debian_version))
ch.write_to_open_file(open(args[0], 'w'))
|