summaryrefslogtreecommitdiff
path: root/version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'version.sh')
-rwxr-xr-xversion.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/version.sh b/version.sh
index 6ec2b2567e..51bca4f21a 100755
--- a/version.sh
+++ b/version.sh
@@ -1,8 +1,10 @@
#!/bin/sh
# check for git short hash
-revision=$(cd "$1" && git describe --always 2> /dev/null)
-test "$revision" && revision=git-$revision
+if ! test "$revision"; then
+ revision=$(cd "$1" && git describe --tags --match N 2> /dev/null)
+ test "$revision" && revision=git-$revision
+fi
# no revision number found
test "$revision" || revision=UNKNOWN
@@ -18,7 +20,7 @@ if [ -z "$2" ]; then
exit
fi
-NEW_REVISION="#define LIBAV_VERSION \"$version\""
+NEW_REVISION="#define FFMPEG_VERSION \"$version\""
OLD_REVISION=$(cat version.h 2> /dev/null)
# Update version.h only on revision changes to avoid spurious rebuilds