Merge "Gracefully fail if branches have no tags"
This commit is contained in:
@@ -63,10 +63,13 @@ def git_log(workdir, repo, title, git_range, extra_args=[]):
|
|||||||
def git_list_existing_branches(workdir, repo):
|
def git_list_existing_branches(workdir, repo):
|
||||||
header('All Branches with Version Numbers')
|
header('All Branches with Version Numbers')
|
||||||
for branch in gitutils.get_branches(workdir, repo):
|
for branch in gitutils.get_branches(workdir, repo):
|
||||||
|
try:
|
||||||
description = subprocess.check_output(
|
description = subprocess.check_output(
|
||||||
['git', 'describe', branch],
|
['git', 'describe', branch],
|
||||||
cwd=os.path.join(workdir, repo),
|
cwd=os.path.join(workdir, repo),
|
||||||
).decode('utf-8').strip()
|
).decode('utf-8').strip()
|
||||||
|
except subprocess.CalledProcessError as exc:
|
||||||
|
description = exc.output
|
||||||
print('{:<30} {}'.format(branch, description))
|
print('{:<30} {}'.format(branch, description))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user