blob: e56da0ace197961b68c8834afca67e491df40cdf [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
Marco Varlese5fcca2a2018-10-18 09:37:17 +02004starttag = 'v18.10-rc0'
5endtag = 'v18.10'
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