chore: add build id to settings page (#6873)
- Adds a build Id to the settings page
This commit is contained in:
13
config/initializers/git_sha.rb
Normal file
13
config/initializers/git_sha.rb
Normal 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
|
||||
Reference in New Issue
Block a user