Skip to content

Commit

Permalink
Tweak display of vUNSTABLE changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed Sep 10, 2024
1 parent ff14641 commit a120a42
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions scripts/generate-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a120a42

Please sign in to comment.