Heroku now provides git commit sha in ENV

Heroku builds now have access to a SOURCE_VERSION env var. Easy now to use the git commit sha for things like

  • Cache Versioning
  • About menu showing build ID

Details here: https://devcenter.heroku.com/changelog-items/630

SOURCE_VERSION environment variable in builds
Change effective on 01 April 2015

A SOURCE_VERSION environment variable is now available to builds running on Heroku. For git-push builds, this is the git commit SHA-1 of the source being built. Examples of SOURCE_VERSION uses are versioning generated assets or fingerprinting slugs.