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 # Generate changelog
towncrier --yes 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 # Prepare the header
# We include the generation date in the front matter so that we can use it # We include the generation date in the front matter so that we can use it
# to sort the changelogs at build time. # to sort the changelogs at build time.
cat <<EOF cat <<EOF
--- ---
title: $VERSION Changelog title: $TITLE
linkTitle: $VERSION linkTitle: $LINKTITLE
type: docs type: docs
outputs: outputs:
- html - html
@ -37,7 +47,7 @@ EOF
# Remove trailing whitespace (such as our intentionally blank RST headings) # Remove trailing whitespace (such as our intentionally blank RST headings)
sed -e "s/[ ]*$//" rendered.md sed -e "s/[ ]*$//" rendered.md
} > ../content/changelog/$VERSION.md } > ../content/changelog/$FILENAME
# Cleanup # Cleanup
rm -v rendered.md rm -v rendered.md