chore: add build id to settings page (#6873)

- Adds a build Id to the settings page
This commit is contained in:
Vishnu Narayanan
2023-04-18 00:35:35 +05:30
committed by GitHub
parent c9ce9e5b8f
commit 4505c5dda3
8 changed files with 31 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
# Define a method to fetch the git commit hash
def fetch_git_sha
sha = `git rev-parse HEAD`
if sha.present?
sha.strip
elsif File.exist?('.git_sha')
File.read('.git_sha').strip
else
'unknown'
end
end
GIT_HASH = fetch_git_sha