Provide MD checklists for the changelog (#1937)
* Output changelog checklists Fixes: #1682 Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
ace2712719
commit
00af39ecca
22 changed files with 219 additions and 151 deletions
|
@ -16,24 +16,38 @@ 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: $TITLE
|
||||
linkTitle: $LINKTITLE
|
||||
type: docs
|
||||
outputs:
|
||||
- html
|
||||
- checklist
|
||||
date: $(date -Iseconds)
|
||||
---
|
||||
EOF
|
||||
if [ "$VERSION" = "vUNSTABLE" ]; then
|
||||
echo "## Changes since last release"
|
||||
else
|
||||
if [ "$VERSION" != "vUNSTABLE" ]; then
|
||||
sed -e "s/VERSION/$1/g" -e "s/DATE/$2/g" header.md
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue