Fix version check
authorMichael Hanselmann <hansmi@google.com>
Wed, 24 Nov 2010 19:50:46 +0000 (20:50 +0100)
committerMichael Hanselmann <hansmi@google.com>
Thu, 25 Nov 2010 12:16:48 +0000 (13:16 +0100)
Don't ask … all I say is distcheck.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am
autotools/check-version

index 4e7ec69..34fd055 100644 (file)
@@ -638,7 +638,7 @@ check-dirs: $(BUILT_SOURCES)
 
 check-local: check-dirs
        $(CHECK_PYTHON_CODE) $(check_python_code)
-       $(CHECK_VERSION) $(VERSION)
+       $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
 
 .PHONY: lint
 lint: ganeti $(BUILT_SOURCES)
index 1a2e2b3..46d8c3e 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 shopt -s extglob
 
 readonly version=$1
+readonly newsfile=$2
 readonly numpat='+([0-9])'
 
 case "$version" in
@@ -41,7 +42,7 @@ esac
 
 readonly newsver="Version ${version/~/}"
 
-if ! grep -q -x "$newsver" NEWS
+if ! grep -q -x "$newsver" $newsfile
 then
   echo "Unable to find heading '$newsver' in NEWS" >&2
   exit 1