Files
truecharts/.github/scripts/changelog.sh
Dan Christensen 6afb793e1a fix: Chart changelogs (#7151)
The app-changelog.md files that are generated by git-chglog are not
being constrained tightly enough to specific branches to present useful
changelogs.  For example, the plex-12.0.10..plex-12.0.11 changelog link
to GitHub points to the comparison between
plex-utills-3.0.9..plex-12.0.11.

Using -\d+\.\d+\.\d+ as the tag name suffix seems safe since the version
numbers are under this project's control.

Signed-off-by: Dan Christensen <opello@opello.org>
2023-02-10 15:18:05 +01:00

22 lines
1003 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ -d "charts/${1}" ]]; then
echo "Start processing charts/${1} ..."
chart="charts/${1}"
chartversion=$(cat charts/${1}/Chart.yaml | grep "^version: " | awk -F" " '{ print $2 }')
chartname=$(basename charts/${1})
train=$(basename $(dirname "charts/${1}"))
SCALESUPPORT=$(cat charts/${1}/Chart.yaml | yq '.annotations."truecharts.org/SCALE-support"' -r)
# Ensure to start with a clean slate
rm -rf ${chart}/app-changelog.md || echo "changelog not found..."
echo "Generating changelogs for: ${chartname}"
# SCALE "Changelog" containing only last change
git-chglog --next-tag ${chartname}-${chartversion} --tag-filter-pattern "^${chartname}-\d+\.\d+\.\d+\$" --path ${chart} -o ${chart}/app-changelog.md ${chartname}-${chartversion} || echo "changelog generation failed..."
else
echo "Chart 'charts/${1}' no longer exists in repo. Skipping it..."
fi
echo "Done processing charts/${1} ..."