2019-07-02 17:37:46 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
from __future__ import print_function
|
|
|
|
import fnmatch
|
|
|
|
import os
|
|
|
|
import subprocess
|
2018-04-24 00:02:37 -04:00
|
|
|
|
2022-04-26 19:02:15 +02:00
|
|
|
starttag = "v19.08-rc0"
|
|
|
|
endtag = "HEAD"
|
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
|
|
|
|
2022-04-26 19:02:15 +02:00
|
|
|
for root, dirnames, filenames in os.walk("."):
|
|
|
|
for filename in fnmatch.filter(filenames, "*.api"):
|
2018-01-24 00:51:22 -05:00
|
|
|
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:
|
2022-04-26 19:02:15 +02:00
|
|
|
commits = subprocess.check_output(
|
|
|
|
["git", "log", "--oneline", starttag + ".." + endtag, f]
|
|
|
|
)
|
2018-01-24 00:51:22 -05:00
|
|
|
if commits:
|
2022-04-26 19:02:15 +02:00
|
|
|
if f[0:2] == "./":
|
2018-04-24 00:02:37 -04:00
|
|
|
f = f[2:]
|
|
|
|
if emit_md:
|
2019-07-02 17:37:46 -04:00
|
|
|
print("| @c %s ||" % f)
|
|
|
|
print("| ------- | ------- |")
|
2018-04-24 00:02:37 -04:00
|
|
|
for line in commits.splitlines():
|
|
|
|
parts = line.strip().split()
|
|
|
|
commit = parts[0]
|
2019-07-02 17:37:46 -04:00
|
|
|
message = b" ".join(parts[1:]).decode().replace("|", r"\|")
|
2022-04-26 19:02:15 +02:00
|
|
|
print(
|
|
|
|
"| [%s](https://gerrit.fd.io/r/gitweb?"
|
|
|
|
"p=vpp.git;a=commit;h=%s) | %s |" % (commit, commit, message)
|
|
|
|
)
|
2019-07-02 17:37:46 -04:00
|
|
|
print()
|
2018-04-24 00:02:37 -04:00
|
|
|
else:
|
2019-07-02 17:37:46 -04:00
|
|
|
print(f)
|
|
|
|
print(commits)
|