fix: update app version resolver in flowsettings (#180) (bump:patch)
This commit is contained in:
committed by
GitHub
parent
4d5f9ba39c
commit
35b2927e5c
@@ -15,14 +15,14 @@ this_dir = Path(this_file).parent
|
||||
# change this if your app use a different name
|
||||
KH_PACKAGE_NAME = "kotaemon_app"
|
||||
|
||||
KH_APP_VERSION = config("KH_APP_VERSION", "local")
|
||||
KH_APP_VERSION = config("KH_APP_VERSION", None)
|
||||
if not KH_APP_VERSION:
|
||||
try:
|
||||
# Caution: This might produce the wrong version
|
||||
# https://stackoverflow.com/a/59533071
|
||||
KH_APP_VERSION = version(KH_PACKAGE_NAME)
|
||||
except Exception as e:
|
||||
print(f"Failed to get app version: {e}")
|
||||
except Exception:
|
||||
KH_APP_VERSION = "local"
|
||||
|
||||
# App can be ran from anywhere and it's not trivial to decide where to store app data.
|
||||
# So let's use the same directory as the flowsetting.py file.
|
||||
|
Reference in New Issue
Block a user