mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-09 12:38:35 -05:00
Add the git commit hash details to the About dialog. #7623
This commit is contained in:
@@ -103,6 +103,16 @@ if not os.path.isfile(config.SQLITE_PATH):
|
||||
app = create_app()
|
||||
app.config['sessions'] = dict()
|
||||
|
||||
# We load the file here instead of evaluate config
|
||||
# as we don't know the path of this file in evaluate config
|
||||
# commit_hash file resides in the web directory
|
||||
try:
|
||||
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'commit_hash')) as f:
|
||||
config.COMMIT_HASH = f.readline().strip()
|
||||
except FileNotFoundError as _:
|
||||
config.COMMIT_HASH = None
|
||||
|
||||
if setup_db_required:
|
||||
setup.setup_db(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user