diff options
author | Andre Miranda <andreldm@xfce.org> | 2020-07-09 20:38:37 -0300 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2020-07-09 20:42:08 -0300 |
commit | 4ada3e6733bf7e6383be78702c669beb3c4bcad5 (patch) | |
tree | 1204c310d9bd1b730381c9d041be334f30a5302b /helpers | |
parent | 3412f9b7d22490792707e7aecb1c06a4bf8f27e8 (diff) | |
download | xfce4-dev-tools-4ada3e6733bf7e6383be78702c669beb3c4bcad5.tar.gz |
helpers: Reuse release notes from NEWS for tag message
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/xfce-update-news | 8 |
1 files changed, 6 insertions, 2 deletions
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" |