From 7e8c0165063b820e80790f0ecb7504f50a3562d4 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 25 Nov 2019 20:40:52 +0100 Subject: [PATCH] SCRIPTS: update create-release to fix the changelog on new branches The changelog is empty when creating a dev0 version and this confuses the commit message, let's clearly mention the exact copy when there are no changes. --- scripts/create-release | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/create-release b/scripts/create-release index fe6c802e6..8a8e05d69 100755 --- a/scripts/create-release +++ b/scripts/create-release @@ -164,7 +164,11 @@ echo "Updating CHANGELOG ..." echo echo "$DATE : $NEW" #git shortlog v$OLD.. | sed -ne 's/^ / - /p' - git log --oneline --reverse --format=" - %s" v$OLD.. + if [ $(git log --oneline v$OLD.. | wc -l) = 0 ]; then + echo " - exact copy of $OLD" + else + git log --oneline --reverse --format=" - %s" v$OLD.. + fi echo tail -n +4 CHANGELOG ) >.chglog.tmp && mv .chglog.tmp CHANGELOG