From: Willy Tarreau Date: Mon, 25 Nov 2019 19:40:52 +0000 (+0100) Subject: SCRIPTS: update create-release to fix the changelog on new branches X-Git-Tag: v2.2-dev1~239 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e8c0165063b820e80790f0ecb7504f50a3562d4;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/scripts/create-release b/scripts/create-release index fe6c802e61..8a8e05d69f 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