We use commit sha's to version our assets. This buildpacks exposes the SOURCE_VERSION
build time environment variable to the runtime as well.
Heroku provides the SOURCE_VERSION environment variable as a nice SCM-agnostic way to do this. We can use a buildpack to create a profile.d script that will export SOURCE_VERSION into the app runtime environment.
Add the buildpack to your app:
heroku buildpacks:add https://github.com/Lostmyname/heroku-buildpack-version