Code

Bump version to 5.7.2; Update ChangeLog.
[collectd.git] / version-gen.sh
index e0ad124e237e063416099a588ada8fc4158e7d44..2c7a2e552fe6013f85bbfad8498aa1ad6f5f6b27 100755 (executable)
@@ -1,13 +1,13 @@
 #!/bin/sh
 
-DEFAULT_VERSION="5.5.1.git"
+DEFAULT_VERSION="5.7.2.git"
 
-VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
+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"
 fi
 
-VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
-
 printf "%s" "$VERSION"