X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=version.sh;h=51bca4f21ae4c072250a3e44fb67439d09ff823d;hb=da3716021b707d284454bd294ad9254188dd7caa;hp=66a1c6f0ac17412ff013f0ee3be68b31d94d8194;hpb=a03be6e1ba4cbf9984b0bbdb674704bbb2da6713;p=ffmpeg diff --git a/version.sh b/version.sh index 66a1c6f0ac1..51bca4f21ae 100755 --- a/version.sh +++ b/version.sh @@ -1,11 +1,8 @@ #!/bin/sh -revision=$(cd "$1" && cat snapshot_version 2> /dev/null) -test "$revision" && revision=SVN-r$revision - # check for git short hash if ! test "$revision"; then - revision=$(cd "$1" && git describe --always 2> /dev/null) + revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) test "$revision" && revision=git-$revision fi @@ -23,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