Files
collectd/version-gen.sh
2017-11-04 21:36:01 +01:00

14 lines
267 B
Bash
Executable File

#!/bin/sh
DEFAULT_VERSION="5.8.0-RC0.git"
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
printf "%s" "$VERSION"