diff options
author | Rob Austein <sra@hactrn.net> | 2016-07-19 14:30:31 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-07-19 14:30:31 +0000 |
commit | d1251e79609b49940aebdea858d457e29020dc6a (patch) | |
tree | 3fa4dc0a2fa64562bc4bf92d8af7d3e2cd653f10 | |
parent | 73f92dd8ce37769310245e49982197772548e536 (diff) |
Simplistic hack for versioning with git.
svn path=/branches/tk705/; revision=6447
-rw-r--r-- | buildtools/build-debian-packages.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildtools/build-debian-packages.py b/buildtools/build-debian-packages.py index 10e0a138..c2d30280 100644 --- a/buildtools/build-debian-packages.py +++ b/buildtools/build-debian-packages.py @@ -51,6 +51,10 @@ elif os.path.exists(".git/svn"): time = subprocess.check_output(("git", "show", "--no-patch", "--format=%ct", "HEAD")).strip(), commit = subprocess.check_output(("git", "rev-parse", "HEAD")).strip()) del git_svn_log +elif os.path.exists(".git"): + # Ideally we'd use something like "git describe --dirty --tags --always" but I don't want to deal with that + # generating something that won't parse as a package number. Using a timestamp is icky, but also simple. + version = "0.{}".format(subprocess.check_output(("git", "show", "--no-patch", "--format=%ct", "HEAD")).strip()) else: sys.exit("Sorry, don't know how to extract version number from this source tree") |