Skip to content

Commit

Permalink
Move the changelog templates out of .unreleased (#7427)
Browse files Browse the repository at this point in the history
This way it's easier to delete the entire .unreleased folder after the
changelog is generated, instead of enumerating every single changelog
file but skipping the templates.
  • Loading branch information
akuzm authored Nov 7, 2024
1 parent 7faf5f7 commit e458ff4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions scripts/merge_changelogs.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/usr/bin/env bash
set -eu

#
# This script build a CHANGELOG.md entry for a new release
#

RELEASE_NOTES_HEADER_TEMPLATE='.unreleased/RELEASE_NOTES_HEADER.md.j2'
REPO="$(readlink -e "$(dirname "${BASH_SOURCE[0]}")/..")"
RELEASE_NOTES_HEADER_TEMPLATE="$REPO/scripts/changelog/RELEASE_NOTES_HEADER.md.j2"

echo_changelog() {
echo "${1}"
# skip the template and release notes files
grep -i "${2}" .unreleased/* | \
grep -v '.unreleased/template.*' | \
grep -v "${RELEASE_NOTES_HEADER_TEMPLATE}" | \
cut -d: -f3- | sort | uniq | sed -e 's/^[[:space:]]*//' -e 's/^/* /'
echo
}
Expand All @@ -33,7 +33,7 @@ then
jinja \
-D release_current "${RELEASE_CURRENT}" \
-D release_previous "${RELEASE_PREVIOUS}" \
-D release_date "${RELEASE_DATE}" ${RELEASE_NOTES_HEADER_TEMPLATE}
-D release_date "${RELEASE_DATE}" "${RELEASE_NOTES_HEADER_TEMPLATE}"
echo
fi

Expand Down

0 comments on commit e458ff4

Please sign in to comment.