We are looking for a way to inject the current commit hash and message into a site. It is not possible to do that using a Git hook, because writing to a file would change the commit hash.
So, is it possible to write the commit hash and message to the file system when it is deployed to Heroku? This could work similarly to the assets compilation process.
I think there are 2 parts to the problem:
- Writing to the file system during the deploy.
- Getting the hash and message of the deploy.