summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 598a534)
raw | patch | inline | side by side (parent: 598a534)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Wed, 4 Mar 2015 13:54:52 +0000 (14:54 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 28 Nov 2015 12:23:34 +0000 (13:23 +0100) |
This fixes an issue I see when extracting a collectd
tarball into another git repo (the Fedora collectd rpm one).
In that case version-gen.sh picked up the last tag from the Fedora
repo, which is the wrong one.
tarball into another git repo (the Fedora collectd rpm one).
In that case version-gen.sh picked up the last tag from the Fedora
repo, which is the wrong one.
version-gen.sh | patch | blob | history |
diff --git a/version-gen.sh b/version-gen.sh
index a80e9790afd909d928fe23ec6ebedaed199b6eec..493a6ebfb26c71580c87c2d62a631c6af4228ea4 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
DEFAULT_VERSION="5.5.0.git"
-VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"
+if [ -d .git ]; then
+ VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"
+fi
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"