Skip to content
GitLab
Explore
Sign in
Commits on Source (1)
Add more information to the reported version in the version route
· 8805be6b
Marco De Donno
authored
Jul 06, 2019
8805be6b
Hide whitespace changes
Inline
Side-by-side
module.py
View file @
8805be6b
...
@@ -155,11 +155,15 @@ def ping():
...
@@ -155,11 +155,15 @@ def ping():
@app.route
(
baseurl
+
'
/version
'
)
@app.route
(
baseurl
+
'
/version
'
)
def
version
():
def
version
():
from
version
import
__version__
from
version
import
__version__
,
__branch__
,
__commit__
,
__commiturl__
,
__treeurl__
return
jsonify
(
{
return
jsonify
(
{
'
error
'
:
False
,
'
error
'
:
False
,
'
version
'
:
__version__
}
'
version
'
:
__version__
,
)
'
branch
'
:
__branch__
,
'
commit
'
:
__commit__
,
'
commiturl
'
:
__commiturl__
,
'
treeurl
'
:
__treeurl__
}
)
################################################################################
################################################################################
# App serving
# App serving
...
...
version.py
View file @
8805be6b
__version__
=
'
dev
'
__version__
=
'
dev
'
__branch__
=
''
__commit__
=
''
__commiturl__
=
''
__treeurl__
=
''