]> granicus.if.org Git - docbook-dsssl/commitdiff
Report errors during changelog generation.
authorStefan Seefeld <stefan@seefeld.name>
Wed, 22 Aug 2018 00:38:05 +0000 (20:38 -0400)
committerStefan Seefeld <stefan@seefeld.name>
Wed, 22 Aug 2018 01:24:47 +0000 (21:24 -0400)
releasetools/changelog.py

index 845d825f0d75e898f2440239515af054d066076c..6dfabc3b10a35bef145e5c14395689a53225e3bc 100644 (file)
@@ -18,8 +18,12 @@ GIT_LOG_FORMAT = '%x1e' + '%x1f'.join(GIT_LOG_FORMAT)
 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)