From: Holger Levsen Date: Wed, 31 Aug 2011 17:21:21 +0000 (+0200) Subject: deal with master branch X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ac46a2dc4b7bf7c0f09e11c81e3da8f47416b28d;p=profitbricks%2Fjenkins-build-scripts.git deal with master branch --- diff --git a/build.py b/build.py index 266989a..472da26 100755 --- a/build.py +++ b/build.py @@ -343,6 +343,34 @@ if __name__ == '__main__': 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():