Files
chatwoot/config/initializers/git_sha.rb
Vishnu Narayanan 4505c5dda3 chore: add build id to settings page (#6873)
- Adds a build Id to the settings page
2023-04-18 00:35:35 +05:30

14 lines
247 B
Ruby

# 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