From 1415c4ed9149c134813368caf728a79fd6e69800 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 17 Sep 2013 18:35:38 +0100 Subject: [PATCH] version-gen.sh: Ensure only collectd repository versions are used When cross compiling in hosted environments using RPM, the extracted tar-ball can be located in a parent .git repository. The version-gen.sh script will then take the version number from this repository as if it represents collectd. This can be even more erroneous when the version returned is non numerical and breaks the build Signed-off-by: Kieran Bingham --- version-gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-gen.sh b/version-gen.sh index e89e7113..7fbc8671 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -2,7 +2,7 @@ DEFAULT_VERSION="5.4.0.git" -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" +VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" if test -z "$VERSION"; then VERSION="$DEFAULT_VERSION" -- 2.11.0