]> xenbits.xensource.com Git - seabios.git/commitdiff
build: Use git describe --always
authorKevin O'Connor <kevin@koconnor.net>
Tue, 27 Feb 2018 16:27:59 +0000 (11:27 -0500)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 19 Mar 2018 09:10:29 +0000 (10:10 +0100)
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>
(cherry picked from commit a3c93bd81df628a218b9363f13188367417baaec)

scripts/buildversion.py

index 46928984e4d4a519e5860951765bdc1fedad74d2..8875497cb72cb26f6e438d10419c4583b61c5b64 100755 (executable)
@@ -36,7 +36,7 @@ def git_version():
     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