Moving version to a single place in version.py (#358)

* Moving version to a single place in version.py
* Requirements in setup.py + tox.ini
This commit is contained in:
Mike Terzo
2017-02-13 00:35:15 -05:00
committed by GitHub
parent 35486e8e49
commit 1e5f683b66
13 changed files with 142 additions and 94 deletions

View File

@@ -0,0 +1,5 @@
#
# Pupppetboard
#
from .version import __version__

View File

@@ -29,6 +29,8 @@ from puppetboard.dailychart import get_daily_reports_chart
import werkzeug.exceptions as ex
from . import __version__
REPORTS_COLUMNS = [
{'attr': 'end', 'filter': 'end_time',
'name': 'End time', 'type': 'datetime'},
@@ -66,6 +68,11 @@ logging.basicConfig(level=numeric_level)
log = logging.getLogger(__name__)
@app.template_global()
def version():
return __version__
def stream_template(template_name, **context):
app.update_template_context(context)
t = app.jinja_env.get_template(template_name)

View File

@@ -87,7 +87,7 @@
{% endfor %}
</div>
</div>
<div class="item right"><a href="https://github.com/voxpupuli/puppetboard" target="_blank">v0.2.1</a></div>
<div class="item right"><a href="https://github.com/voxpupuli/puppetboard" target="_blank">{{version()}}</a></div>
</div>
<div class="ui grid padding-bottom">
<div class="one wide column"></div>

5
puppetboard/version.py Normal file
View File

@@ -0,0 +1,5 @@
#
# Puppetboard version module
#
__version__ = '0.3.0.dev0'