build: Use git describe --always
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/scripts/buildversion.py b/scripts/buildversion.py
index 4692898..8875497 100755
--- a/scripts/buildversion.py
+++ b/scripts/buildversion.py
@@ -36,7 +36,7 @@
if not os.path.exists('.git'):
logging.debug("No '.git' file/directory found")
return ""
- ver = check_output("git describe --tags --long --dirty").strip()
+ ver = check_output("git describe --always --tags --long --dirty").strip()
logging.debug("Got git version: %s" % (repr(ver),))
return ver