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:
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Pupppetboard
|
||||
#
|
||||
|
||||
from .version import __version__
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
5
puppetboard/version.py
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Puppetboard version module
|
||||
#
|
||||
|
||||
__version__ = '0.3.0.dev0'
|
||||
Reference in New Issue
Block a user