Fix: make gen-version-i.sh work with shallow clones
[babeltrace.git] / src / common / gen-version-i.sh
index 938d70c59565e0e28847c83227bac761990961b5..a53593cd229c9b503053d7d913eeb04644cc7d1f 100755 (executable)
@@ -42,7 +42,7 @@ fi
 # configurations leading to different results.
 if test -r "$TOP_SRCDIR/bootstrap" && test -r "$TOP_SRCDIR/.git" &&
                (command -v git > /dev/null 2>&1); then
-       GIT_VERSION_STR="$(cd "$TOP_SRCDIR" && git describe --tags --dirty --abbrev=12)"
+       GIT_VERSION_STR="$(cd "$TOP_SRCDIR" && git describe --always --tags --dirty --abbrev=12)"
        GIT_CURRENT_TAG="$(cd "$TOP_SRCDIR" && (git describe --tags --exact-match --match="v[0-9]*" HEAD || true) 2> /dev/null)"
        echo "#define BT_VERSION_GIT \"$GIT_VERSION_STR\"" > version.i.tmp
 
This page took 0.025357 seconds and 4 git commands to generate.