From bbce981e96c95b903d1c0b9642d37a87b674524d Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 8 Jun 2015 14:47:25 +0530 Subject: [PATCH] [release] Check for changelog and commits as list in markdown --- bench/release.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bench/release.py b/bench/release.py index ac9c78cb..79b1396c 100644 --- a/bench/release.py +++ b/bench/release.py @@ -137,10 +137,16 @@ def get_current_version(repo): contents) return match.group(2) +def check_for_unmerged_changelog(repo): + current = os.path.join(repo, os.path.basename(repo), 'change_log', 'current') + if os.path.exists(current) and os.listdir(current): + raise Exception("Unmerged change log! in " + repo) + def bump_repo(repo, bump_type, develop='develop', master='master', remote='upstream'): update_branch(repo, master, remote=remote) update_branch(repo, develop, remote=remote) git.Repo(repo).git.checkout(develop) + check_for_unmerged_changelog(repo) current_version = get_current_version(repo) new_version = get_bumped_version(current_version, bump_type) set_version(repo, new_version) @@ -149,7 +155,7 @@ def bump_repo(repo, bump_type, develop='develop', master='master', remote='upstr def get_release_message(repo_path, develop_branch='develop', master_branch='master'): repo = git.Repo(repo_path) g = repo.git - return g.log('upstream/{master_branch}..upstream/{develop_branch}'.format(master_branch=master_branch, develop_branch=develop_branch), '--format=format:%s', '--no-merges') + return "* " + g.log('upstream/{master_branch}..upstream/{develop_branch}'.format(master_branch=master_branch, develop_branch=develop_branch), '--format=format:%s', '--no-merges').replace('\n', '\n* ') def bump(repo, bump_type, develop='develop', master='master', remote='upstream'): assert bump_type in ['minor', 'major', 'patch']