I want to display the hash of the current git commit in the browser so that testing team (which does not have an access to run heruko commands) will be able to include the corresponding commit hash in bug reports.
First I tried grit, but something is broken and it doesn't work on Heroku (on local it works great, I don't know why it fails on Heroku).
So I found out that there are two environment variables on Heroku:
ENV["COMMIT_HASH"]
ENV["LAST_COMMIT_BY"]
But neither of them is available (both are nil).
I also checked with:
heroku config
But again, neither is set.
Is there a way to retrieve the hash information? Is there any way to have more git information, such as date for example?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…