From 4ada3e6733bf7e6383be78702c669beb3c4bcad5 Mon Sep 17 00:00:00 2001 From: Andre Miranda Date: Thu, 9 Jul 2020 20:38:37 -0300 Subject: helpers: Reuse release notes from NEWS for tag message --- helpers/xfce-update-news | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'helpers') diff --git a/helpers/xfce-update-news b/helpers/xfce-update-news index cc266ca..3e3105c 100755 --- a/helpers/xfce-update-news +++ b/helpers/xfce-update-news @@ -7,9 +7,13 @@ LAST_TAG=$(git describe --abbrev=0) RELEASE_NOTES=$(xfce-get-release-notes "$LAST_TAG" silent) TRANSLATIONS=$(xfce-get-translations "$LAST_TAG" "HEAD" silent) -# Check if there is a NEWS file if [ "$WRITE_TAG" = "WRITETAG" ]; then - printf '%s\n\n%s\n%s\n' $VERSION "$RELEASE_NOTES" "$TRANSLATIONS" + # Use release note from NEWS if possible, they may have been edited + if [ -f "NEWS" ] && [ "$VERSION" = "$(head -n 1 NEWS)" ]; then + sed '/^[[:space:]]*$/q' NEWS + else + printf '%s\n\n%s\n%s\n' $VERSION "$RELEASE_NOTES" "$TRANSLATIONS" + fi elif [ ! -f "NEWS" ]; then echo "There is no 'NEWS' file. Changelog since $VERSION:" printf '%s\n======\n%s\n%s\n\n%s' $VERSION "$RELEASE_NOTES" "$TRANSLATIONS" -- cgit v1.2.1