diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-28 02:40:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-28 15:44:59 +0200 |
commit | f3158c3f29cd24cf50a02b58201ec2cf149b51e5 (patch) | |
tree | 7952c172bf3d0efeb0e9ef8d7881a5d8c0ac744c /version.sh | |
parent | 243236a6f589fbf898e3015c15008776522c925a (diff) | |
download | ffmpeg-f3158c3f29cd24cf50a02b58201ec2cf149b51e5.tar.gz |
version.sh: Print versions based on the last git tag for release branches
release branches are detected by checking if "git" is not in RELEASE
This changes "N-64706-g2f71aeb" to "n2.3-8-g2f71aeb"
for git master theres no change
This should improve the readability of lists of versions which come from
more than 1 release branch or master + release. fate.ffmpeg.org is
one possible example
Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ee606fd0317df202b59946cf9b738c0a01056316)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'version.sh')
-rwxr-xr-x | version.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/version.sh b/version.sh index 92edcb9474..f9754eb3cf 100755 --- a/version.sh +++ b/version.sh @@ -4,7 +4,11 @@ # check for git short hash if ! test "$revision"; then - revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) + if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then + revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) + else + revision=$(cd "$1" && git describe --tags --always 2> /dev/null) + fi fi # Shallow Git clones (--depth) do not have the N tag: |