mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
Docs/Versioning: Add Changelog Generator
This commit is contained in:
1 parent
2d6dc80039
commit
ceb7082e37
2 files changed
+54
No files matched your search
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/bin/env python3
|
||||
import sys
|
||||
|
||||
import fileinput
|
||||
import re
|
||||
|
||||
Meta = { }
|
||||
for line in sys.stdin.readlines():
|
||||
if detailed := re.findall("^([A-Za-z0-9]+)/([A-Za-z0-9]+):(.+)$", line):
|
||||
detailed = detailed[0]
|
||||
meta = detailed[0].strip() + "/" + detailed[1].strip()
|
||||
if meta not in Meta:
|
||||
Meta[meta] = []
|
||||
Meta[meta].append(detailed[2].strip())
|
||||
elif category := re.findall("(^[A-Za-z0-9]+):(.+)$", line):
|
||||
category = category[0]
|
||||
if category[0].strip() not in Meta:
|
||||
Meta[category[0].strip()] = []
|
||||
Meta[category[0].strip()].append(category[1].strip())
|
||||
else:
|
||||
if "_Misc" not in Meta:
|
||||
Meta["_Misc"] = []
|
||||
Meta["_Misc"].append(line.strip())
|
||||
|
||||
print("# " + sys.argv[1])
|
||||
|
||||
Category = ""
|
||||
Tag = ""
|
||||
for item in sorted(Meta.items()):
|
||||
if item[0] == "_Misc":
|
||||
tag = "Misc"
|
||||
else:
|
||||
tag = item[0]
|
||||
|
||||
category = tag.split("/")[0]
|
||||
if category != Category:
|
||||
Category = category
|
||||
Tag = ""
|
||||
print("")
|
||||
print("## " + category)
|
||||
if Tag != tag and tag != category:
|
||||
Tag = tag
|
||||
print("")
|
||||
print("### " + tag.split("/")[1])
|
||||
|
||||
for change in item[1]:
|
||||
print("- " + change)
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/env bash
|
||||
if [ "$#" -ne 2 ];
|
||||
then
|
||||
echo "$0: <PEV-TAG> <NEXT-TAG>"
|
||||
exit -1
|
||||
fi
|
||||
git log "$1..HEAD" --pretty="%b (%h)" --abbrev-commit --merges | Scripts/changelog_generator.py "$2"
|
||||
Reference in new issue
Block a user