subprocess.check_call(cmd)
cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add changelog']
subprocess.check_call(cmd)
+ else:
+ # so we're in the master branch...
+ # (or maybe in other branches, but thats not specified _yet_)
+ # TODO errorchecking etc
+ cmd = ['dpkg-parsechangelog']
+ parse_changelog = subprocess.Popen(
+ cmd,
+ shell=False,
+ close_fds=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd='./'
+ )
+ ret = parse_changelog.wait()
+ stdout_msg = parse_changelog.stdout.read()
+
+ cmd = ['grep-dctrl', '-n', '-s', "Version ''", stdout_msg]
+ grep_dctrl = subprocess.Popen(
+ cmd,
+ shell=False,
+ close_fds=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd='./'
+ )
+ ret = grep_dctrl.wait()
+ version = grep_dctrl.stdout.read()
+
if not GIT_COMMITTER_EMAIL:
for commit in repo.commits():