Tweak display of vUNSTABLE changelog

This commit is contained in:
Johannes Marbach 2024-09-10 11:45:43 +02:00
parent ff14641d0c
commit a120a427ba

View file

@ -16,14 +16,24 @@ rm -f rendered.md
# Generate changelog
towncrier --yes
if [ "$VERSION" = "vUNSTABLE" ]; then
TITLE="Changes since last release"
LINKTITLE="Unstable"
FILENAME="unstable.md"
else
TITLE="$VERSION Changelog"
LINKTITLE="$VERSION"
FILENAME="$VERSION.md"
fi
{
# Prepare the header
# We include the generation date in the front matter so that we can use it
# to sort the changelogs at build time.
cat <<EOF
---
title: $VERSION Changelog
linkTitle: $VERSION
title: $TITLE
linkTitle: $LINKTITLE
type: docs
outputs:
- html
@ -37,7 +47,7 @@ EOF
# Remove trailing whitespace (such as our intentionally blank RST headings)
sed -e "s/[ ]*$//" rendered.md
} > ../content/changelog/$VERSION.md
} > ../content/changelog/$FILENAME
# Cleanup
rm -v rendered.md