feat: update get_version function to read application image from .docker-build.env
This commit is contained in:
+4
-2
@@ -135,8 +135,10 @@ def _get_int_env(name, default):
|
||||
return int(default)
|
||||
|
||||
def get_version():
|
||||
with open(os.path.join(BASE_DIR, '..', '.release-version'), 'r') as f:
|
||||
return f.read().strip()
|
||||
with open(os.path.join(BASE_DIR, '..', '.docker-build.env'), 'r') as f:
|
||||
for l in f:
|
||||
if l.startswith('INVENTAR_APP_IMAGE='):
|
||||
return l.split(':', 1)[1].strip()
|
||||
|
||||
# Expose settings
|
||||
APP_VERSION = get_version()
|
||||
|
||||
Reference in New Issue
Block a user