Skip to content

Commit

Permalink
Report errors during changelog generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseefeld committed Aug 22, 2018
1 parent d540f21 commit 08ff145
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions releasetools/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
command = ['git', 'log', '--format=%s' % GIT_LOG_FORMAT, '--name-only']
if not all:
# Determine the last release tag and limit history to then.
release = ['git', 'describe', '--tags', '--match', 'release/*', '--abbrev=0']
out = subprocess.check_output(release)
release = ['git', 'describe', '--tags', '--match', 'release/*', '--abbrev=0', '--always']
try:
out = subprocess.check_output(release, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
print >> sys.stderr, 'Error executing "{}": {}'.format(' '.join(e.cmd), e.output)
sys.exit(-1)
out = out.strip()
command.append('%s..HEAD'%out.decode(encoding='UTF-8'))
out = subprocess.check_output(command)
Expand Down

0 comments on commit 08ff145

Please sign in to comment.