]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
maint: Add a script to add release entry to ChangeLogs
authorDaiki Ueno <ueno@gnu.org>
Wed, 15 Oct 2014 07:27:27 +0000 (16:27 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 15 Oct 2014 07:27:27 +0000 (16:27 +0900)
Admin/release-steps
Admin/update-changelog [new file with mode: 0755]

index 8836bc59d6bbf84de745f3f9bf9a07724b9262ab..e2b51291f912e062430695bf68b2ad3ceab24760 100644 (file)
@@ -61,6 +61,7 @@ Tasks not to forget before release:
 
 - Add an entry to all the ChangeLogs
   except gettext-tools/examples/hello-c++-kde/admin/ChangeLog.
+  Run Admin/update-changelog from the top-level directory.
 
 - Update translations from the Translation Project
 
diff --git a/Admin/update-changelog b/Admin/update-changelog
new file mode 100755 (executable)
index 0000000..af91587
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# 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 3 of the License, 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+# This file is meant for maintainers of GNU gettext.  It prepends a
+# release-announcement entry to all ChangeLog files.
+#
+#   Usage: update-changelog VERSION USER EMAIL
+
+test $# == 3 || { echo "Usage: $0 VERSION USER EMAIL" 1>&2; exit 1; }
+
+if test ! -d gettext-runtime || test ! -d gettext-tools; then
+  echo "$0: run in the top-level directory" 1>&2
+  exit 1
+fi
+
+ver=$1
+user=$2
+email=$3
+
+for file in `find . -name "ChangeLog"`; do
+  test $file = "./gnulib/ChangeLog" \
+    || test $file = "./gettext-tools/examples/hello-c++-kde/admin/ChangeLog" \
+    || { date=`date -u +%Y-%m-%d`;
+         cat <<EOF
+$date  $user  <$email>
+
+       * gettext $ver released.
+
+EOF
+         cat $file; } > $file.tmp && mv $file.tmp $file
+done