2018-01-24 00:51:22 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import os, fnmatch, subprocess
|
2018-04-24 00:02:37 -04:00
|
|
|
|
2018-10-18 09:37:17 +02:00
|
|
|
starttag = 'v18.10-rc0'
|
|
|
|
endtag = 'v18.10'
|
2018-04-24 00:02:37 -04:00
|
|
|
emit_md = True
|
2018-01-24 00:51:22 -05:00
|
|
|
apifiles = []
|
2018-04-24 00:02:37 -04:00
|
|
|
|
2018-01-24 00:51:22 -05:00
|
|
|
for root, dirnames, filenames in os.walk('.'):
|
|
|
|
for filename in fnmatch.filter(filenames, '*.api'):
|
|
|
|
apifiles.append(os.path.join(root, filename))
|
2018-04-24 00:02:37 -04:00
|
|
|
|
2018-01-24 00:51:22 -05:00
|
|
|
for f in apifiles:
|
|
|
|
commits = subprocess.check_output(['git', 'log',
|
|
|
|
'--oneline', starttag + '..' + endtag,
|
|
|
|
f])
|
|
|
|
if commits:
|
2018-04-24 00:02:37 -04:00
|
|
|
if f[0:2] == './':
|
|
|
|
f = f[2:]
|
|
|
|
if emit_md:
|
|
|
|
print "| @c %s ||" % f
|
|
|
|
print "| ------- | ------- |"
|
|
|
|
for line in commits.splitlines():
|
|
|
|
parts = line.strip().split()
|
|
|
|
commit = parts[0]
|
|
|
|
message = " ".join(parts[1:]).replace("|", "\|")
|
|
|
|
print "| [%s](https://gerrit.fd.io/r/gitweb?" \
|
|
|
|
"p=vpp.git;a=commit;h=%s) | %s |" % (
|
|
|
|
commit, commit, message)
|
|
|
|
print
|
|
|
|
else:
|
|
|
|
print f
|
|
|
|
print commits
|