Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
111b4401
Commit
111b4401
authored
May 15, 2018
by
Sascha Herzinger
Browse files
fixing version request
parent
db5d63d4
Pipeline
#4880
passed with stages
in 14 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.bumpversion.cfg
View file @
111b4401
...
...
@@ -7,3 +7,5 @@ tag = True
[bumpversion:file:docker/docker-compose.yml]
[bumpversion:file:fractalis/misc/controller.py]
fractalis/misc/controller.py
View file @
111b4401
...
...
@@ -2,7 +2,6 @@
in any of the other categories."""
import
logging
import
re
from
typing
import
Tuple
from
flask
import
Blueprint
,
jsonify
,
Response
...
...
@@ -14,7 +13,5 @@ logger = logging.getLogger(__name__)
@
misc_blueprint
.
route
(
'/version'
,
methods
=
[
'GET'
])
def
get_version
()
->
Tuple
[
Response
,
int
]:
with
open
(
'setup.py'
)
as
setup_file
:
text
=
setup_file
.
read
()
version
=
re
.
search
(
r
'version=\'(\d+\.\d+\.\d+)\','
,
text
).
group
(
1
)
version
=
'0.5.2'
return
jsonify
({
'version'
:
version
}),
201
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment