Updating a REVISION environment variable
Clone this wiki locally
Sometimes you want your application to report what revision (aka git sha) it is running. The HerokuSan::Stage object has a method
#revision which returns the current sha. Then you can use the
#push_config method to update the environment variable of your choice with the new revision sha.
task :after_deploy do each_heroku_app do |stage| revision = stage.revision.split.first stage.push_config('REVISION' => revision) if revision end end