[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.8-26-gd62485f

Sandro Tosi morph at debian.org
Fri Nov 27 21:27:22 UTC 2009


The following commit has been merged in the master branch:
commit d62485ff29c72c3c28fc1fc0b26ee2cd1651a6b0
Author: Sandro Tosi <morph at debian.org>
Date:   Fri Nov 27 22:01:01 2009 +0100

    better check for outdated version number but only when releasing

diff --git a/debian/rules b/debian/rules
index baa7970..02b41ea 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,15 +5,16 @@
 
 VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | sed 's/^Version: \([^+]*\).*/\1/')
 DISTRO := $(shell dpkg-parsechangelog | egrep '^Distribution:' | sed 's/^Distribution: \([^+]*\).*/\1/')
+REPORTBUG_VERSION := $(shell python -c "import reportbug; print reportbug.VERSION_NUMBER")
 
 build: build-stamp
 build-stamp:
 	dh_testdir
 
 	# Test if versions are synchronized (only if releasing); this will bomb if not synced
-	if [ "$(DISTRO)" != "UNRELEASED" ] ; \
+	if [ "$(DISTRO)" != "UNRELEASED" -a "$(REPORTBUG_VERSION)" != "$(VERSION)" ] ; \
 	then \
-		@python -c "import reportbug, sys; sys.exit(reportbug.VERSION_NUMBER != '$(VERSION)')" || (echo 'Please update reportbug/__init__.py __version__'; exit 1) ; \
+		echo 'Please update VERSION_NUMBER variable in reportbug/__init__.py'; exit 1 ; \
 	fi
 
 	po4a po4a/po4a.cfg

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list