fix: build_id in heroku installations (#6932)

This commit is contained in:
Vishnu Narayanan
2023-04-19 21:39:10 +05:30
committed by GitHub
parent 5cdc7d654a
commit 76d4c22c2d

View File

@@ -5,6 +5,9 @@ def fetch_git_sha
sha.strip
elsif File.exist?('.git_sha')
File.read('.git_sha').strip
# This is for Heroku. Ensure heroku labs:enable runtime-dyno-metadata is turned on.
elsif ENV.fetch('HEROKU_SLUG_COMMIT', nil).present?
ENV.fetch('HEROKU_SLUG_COMMIT', nil)
else
'unknown'
end