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.
This commit is contained in:
Willy Tarreau 2019-11-25 20:40:52 +01:00
parent cdb27e8295
commit 7e8c016506

View File

@ -164,7 +164,11 @@ echo "Updating CHANGELOG ..."
echo echo
echo "$DATE : $NEW" echo "$DATE : $NEW"
#git shortlog v$OLD.. | sed -ne 's/^ / - /p' #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 echo
tail -n +4 CHANGELOG tail -n +4 CHANGELOG
) >.chglog.tmp && mv .chglog.tmp CHANGELOG ) >.chglog.tmp && mv .chglog.tmp CHANGELOG