blob: 0c5db3c7b0557521f878e8fa8a8c64f2295d523a [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
Andrew Yourtchenko3a18f7b2019-01-21 16:50:47 +01004starttag = 'v19.01-rc0'
5endtag = 'v19.01'
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