changeset 23896:6c8be58d0d04

Add some more code to the version-check target to test the ChangeLog files for the appropriate version header.
author Richard Laager <rlaager@wiktel.com>
date Mon, 25 Aug 2008 19:39:00 +0000
parents 9967f971bb3f
children f7480644b83e
files Makefile.am
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Mon Aug 25 13:18:07 2008 +0000
+++ b/Makefile.am	Mon Aug 25 19:39:00 2008 +0000
@@ -31,7 +31,25 @@
 #	cp libpurple/plugins/perl/common/Gaim.pm $(distdir)/libpurple/plugins/perl/common
 
 version-check:
+# We don't want to release development versions.
+	test x`echo $(PACKAGE_VERSION) | grep dev` = x
+
+# Ensure NEWS has no spaces at the start of a line.
+# Using spaces instead of tabs there is a common mistake.
+	test x`grep "^ " NEWS` = x
+
+# When doing a new minor (or major) release (X.Y.0), there must be a section in
+# ChangeLog.API.
+	echo $(PACKAGE_VERSION) | grep -v "^[0-9]\+\.[0-9]\+\.0$$" >/dev/null || head ChangeLog.API | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
+
+# For all releases, check the ChangeLogs.
+	head ChangeLog | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
+	head ChangeLog.win32 | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
+	head po/ChangeLog | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
+
+# Ensure we're working from a tag...
 	test x`mtn automate select t:v$(PACKAGE_VERSION)` = x`mtn automate get_base_revision_id`
+# ... and have no changes in the working copy.
 	test x`mtn diff | grep -v '^#'` = x
 
 release: distcheck packages