Skip to content

Commit

Permalink
"human readable version" along with the "git describe" version
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobord committed Apr 22, 2016
1 parent 4b6a096 commit 7db4258
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<body>
<section>$body</section>
<footer>
<p>This website is made by Bruno Bord - 2016, based on David Black &amp; Peter Regan work -- <a href="https://github.com/brunobord/the-black-hack">Github project</a> -- build: v$version</p>
<p>This website is made by Bruno Bord - 2016, based on David Black &amp; Peter Regan work -- <a href="https://github.com/brunobord/the-black-hack">Github project</a> -- build: v$git_version ($version)</p>

</footer>
</body>
Expand Down

0 comments on commit 7db4258

Please sign in to comment.