Commit f3158c3f authored by Michael Niedermayer's avatar Michael Niedermayer 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-g2f71aeb3" to "n2.3-8-g2f71aeb3"
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. is
one possible example
Reviewed-by: Timothy Gu's avatarTimothy Gu <>
Signed-off-by: default avatarMichael Niedermayer <>
(cherry picked from commit ee606fd0)
Signed-off-by: default avatarMichael Niedermayer <>
parent 243236a6
......@@ -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)
revision=$(cd "$1" && git describe --tags --always 2> /dev/null)
# Shallow Git clones (--depth) do not have the N tag:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment