blob: 11150dccc3620d89f21332dc8be36a6cb99b2825 [file] [log] [blame]
Dave Wallaced5ae97c2018-01-24 00:51:22 -05001#!/usr/bin/env python
2import os, fnmatch, subprocess
Chris Luke159fcf42018-04-24 00:02:37 -04003
Dave Wallace3c119f82019-04-18 10:08:07 -04004starttag = 'v19.08-rc0'
5endtag = 'HEAD'
Chris Luke159fcf42018-04-24 00:02:37 -04006emit_md = True
Dave Wallaced5ae97c2018-01-24 00:51:22 -05007apifiles = []
Chris Luke159fcf42018-04-24 00:02:37 -04008
Dave Wallaced5ae97c2018-01-24 00:51:22 -05009for root, dirnames, filenames in os.walk('.'):
10 for filename in fnmatch.filter(filenames, '*.api'):
11 apifiles.append(os.path.join(root, filename))
Chris Luke159fcf42018-04-24 00:02:37 -040012
Dave Wallaced5ae97c2018-01-24 00:51:22 -050013for f in apifiles:
14 commits = subprocess.check_output(['git', 'log',
15 '--oneline', starttag + '..' + endtag,
16 f])
17 if commits:
Chris Luke159fcf42018-04-24 00:02:37 -040018 if f[0:2] == './':
19 f = f[2:]
20 if emit_md:
21 print "| @c %s ||" % f
22 print "| ------- | ------- |"
23 for line in commits.splitlines():
24 parts = line.strip().split()
25 commit = parts[0]
26 message = " ".join(parts[1:]).replace("|", "\|")
27 print "| [%s](https://gerrit.fd.io/r/gitweb?" \
28 "p=vpp.git;a=commit;h=%s) | %s |" % (
29 commit, commit, message)
30 print
31 else:
32 print f
33 print commits