diff options
Diffstat (limited to 'version.sh')
-rwxr-xr-x | version.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/version.sh b/version.sh index 73905f05fc..3b0c319c83 100755 --- a/version.sh +++ b/version.sh @@ -5,13 +5,13 @@ test "$1" && extra="-$1" # Extract revision number from file used by daily tarball snapshots # or from "git describe" output git_revision=$(cat snapshot_version 2> /dev/null) -test $git_revision || test ! -d .git || git_revision=`git describe --match "v[0-9]*" --always` +test $git_revision || test ! -d .git || git_revision=`git rev-parse --short HEAD` git_revision=$(expr "$git_revision" : v*'\(.*\)') test $git_revision || git_revision=UNKNOWN # releases extract the version number from the VERSION file version=$(cat VERSION 2> /dev/null) -test $version || version=$git_revision +test $version || version=git-$git_revision NEW_REVISION="#define VERSION \"${version}${extra}\"" OLD_REVISION=$(head -n 1 version.h 2> /dev/null) |