From 7db4258d0e11eae72b185b61c276c7bbea4b9390 Mon Sep 17 00:00:00 2001 From: Bruno Bord Date: Sat, 23 Apr 2016 00:20:43 +0200 Subject: [PATCH] "human readable version" along with the "git describe" version --- build.py | 10 +++++++--- templates/base.html | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index cb468e2..2591f4f 100644 --- a/build.py +++ b/build.py @@ -16,7 +16,8 @@ if __name__ == '__main__': - version = shell('git describe --tags').output(raw=True) + version = shell('git describe --tags --abbrev=0').output(raw=True).strip() + git_version = shell('git describe --tags').output(raw=True).strip() build_path = 'build' static_path = join(build_path, 'static') @@ -52,6 +53,7 @@ title=directory, static='../static', version=version, + git_version=git_version, ) target_dir = join(build_path, directory) if not os.path.isdir(target_dir): @@ -102,7 +104,8 @@ body=body_html, title="Home", static='static', - version=version + version=version, + git_version=git_version, ) with open(join(build_path, 'index.html'), 'w') as fd: fd.write(html) @@ -119,7 +122,8 @@ body=license_html, title="Open Gaming License", static='static', - version=version + version=version, + git_version=git_version, ) with open(join(build_path, 'license.html'), 'w') as fd: fd.write(html) diff --git a/templates/base.html b/templates/base.html index 3e0d389..1b29778 100644 --- a/templates/base.html +++ b/templates/base.html @@ -70,7 +70,7 @@
$body