Skip to content
Snippets Groups Projects
Commit 9bf27b5b authored by David Trattnig's avatar David Trattnig
Browse files

Chore: Read plain VERSION file #81

parent f2855a2e
No related branches found
No related tags found
No related merge requests found
1.0.0-alpha1-dev
\ No newline at end of file
# Meta
__author__ = "David Trattnig"
__copyright__ = "Copyright 2017-2020, Aura Engine Team"
__credits__ = []
__license__ = "GNU Affero General Public License (AGPL) Version 3"
__version__ = "0.9.0"
__version_info__ = (0, 9, 0)
__maintainer__ = "David Trattnig"
__email__ = "david.trattnig@subsquare.at"
__status__ = "Development"
......@@ -19,9 +19,9 @@
import atexit
import sys
import os
import connexion
import aura_engine_api
from aura_engine_api.base.config import AuraConfig
from aura_engine_api.base.logger import AuraLogger
from aura_engine_api.base.node import NodeType
......@@ -71,7 +71,6 @@ def after_request(response):
header["Access-Control-Allow-Origin"] = config.get("api_cors")
return response
def startup():
"""
Startup Server.
......@@ -79,7 +78,6 @@ def startup():
port = config.get("api_port")
api.run(port=port)
def shutdown():
"""
Called when the application shuts down.
......@@ -87,6 +85,10 @@ def shutdown():
if sync_job:
sync_job.exit()
def get_version():
with open(os.path.join("", 'VERSION')) as version_file:
return version_file.read().strip()
with app.app_context():
"""
......@@ -119,7 +121,7 @@ with app.app_context():
federation = "disabled"
splash = (
"\n\n ░E░N░G░I░N░E░░░A░P░I░ - v%s running as %s node - Federation %s.\n\n"
% (aura_engine_api.__version__, type, federation)
% (get_version(), type, federation)
)
logger.info(splash)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment