LogarithmPlotter/linux/generate-appstream-changelog.sh
Ad5001 92594f5af3
All checks were successful
continuous-integration/drone/push Build is passing
Release v0.1.5 - Urgent bug fixes.
2022-01-26 10:28:10 +01:00

16 lines
517 B
Bash

cat ../CHANGELOG.md | awk '{
if($1 == "*") {
s = ""; for (i = 2; i <= NF; i++) s = s " " $i;
print " <li>"substr(s,2)"</li>"
} else if($1 == "##") {
cmd ="date \"+%Y-%m-%d\" -d \""substr($3,2,2)" "$4" "substr($5,0,4)"\""
cmd | getline date
print " <release version=\""substr($2,2,5)"\" date=\""date"\">"
print " <p>Changes for "$2":</p>"
print " <ul>"
} else if($1 == "--") {
print " </ul>"
print " </release>"
}
}'