Skip to content

Commit 2eb97c3

Browse files
docs: first try at automating release notes
1 parent 92396ec commit 2eb97c3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/release-summary.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
curr_hash=$(git show-ref | grep 'HEAD' | cut -d' ' -f1)
4+
prev_hash=$(git show-ref | tail -1 | cut -d' ' -f1)
5+
commits=$(git log --oneline $prev_hash..$curr_hash)
6+
7+
python3 <<EOF
8+
from collections import defaultdict
9+
commits = defaultdict(list)
10+
11+
for c in """$commits""".split("\n")[1:]:
12+
h, mod, *m = c.split(" ")
13+
commits[mod].append((h, *m))
14+
15+
for mod, cs in commits.items():
16+
print(f"\n\n#### {mod}")
17+
for (h, *m) in cs:
18+
print(f"{h}:", *m)
19+
EOF
20+

0 commit comments

Comments
 (0)