mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 21:14:09 +01:00
Sort changelogs by release date
This commit is contained in:
parent
78a673718f
commit
46596d750a
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
date: 1636416000
|
||||
---
|
||||
<!--
|
||||
This is a header file for the generated changelog.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
date: 1643760000
|
||||
---
|
||||
<!--
|
||||
This is a header file for the generated changelog.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
date: 1655247600
|
||||
---
|
||||
<!--
|
||||
This is a header file for the generated changelog.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
date: 1664406000
|
||||
---
|
||||
<!--
|
||||
This is a header file for the generated changelog.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/}}
|
||||
|
||||
{{ with .Page.Resources.Match "*.md" }}
|
||||
{{ range ((sort . "Name" "desc")) }}
|
||||
{{ range ((sort . "Params.date" "desc")) }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,15 @@ towncrier --name "Client-Server API" --dir "./client_server" --config "./pyproje
|
|||
|
||||
{
|
||||
# Prepare the header
|
||||
if [ "$VERSION" = "vUNSTABLE" ]; then
|
||||
cat <<EOF
|
||||
## Changes since last release
|
||||
# We include the generation date in the front matter so that we can use it
|
||||
# to sort the changelogs at build time.
|
||||
cat <<EOF
|
||||
---
|
||||
date: $(date +%s)
|
||||
---
|
||||
EOF
|
||||
if [ "$VERSION" = "vUNSTABLE" ]; then
|
||||
echo "## Changes since last release"
|
||||
else
|
||||
sed -e "s/VERSION/$1/g" -e "s/DATE/$2/g" header.md
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue