From 3c030521913420bc207fa07e6f9aebed991e3364 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 19 Apr 2022 05:42:22 +0300 Subject: [PATCH 52/52] Add refresh_changelog.sh script Not included in the release tarball as it only works when run in the git repo. See osdn #44415 Signed-off-by: Marko Lindqvist --- scripts/refresh_changelog.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 scripts/refresh_changelog.sh diff --git a/scripts/refresh_changelog.sh b/scripts/refresh_changelog.sh new file mode 100755 index 0000000000..f1a5491c2b --- /dev/null +++ b/scripts/refresh_changelog.sh @@ -0,0 +1,31 @@ +#!/bin/bash +#/*********************************************************************** +# Freeciv - Copyright (C) 2022 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +#***********************************************************************/ + +if ! test -f ChangeLog ; then + echo "This directory has no ChangeLog file!" >&2 + exit 1 +fi + +if ! test -e .git ; then + echo "This does not look like a git repo!" >&2 + exit 1 +fi + +OLDREV="$(head -n 1 ChangeLog | sed 's/.* //')" + +git log --no-decorate --pretty=medium ${OLDREV}..HEAD > ChangeLog.new +echo >> ChangeLog.new +cat ChangeLog >> ChangeLog.new +mv ChangeLog.new ChangeLog -- 2.35.1