Is this even possible - is there something like a RELEASE_VERSION environment variable?
I know it's an oldie, but I didn't find a definite answer anywhere else, so I'm posting it here in case anyone stumbles upon this question. I added an initializer, called deploy_version.rb with the followin content:
if ENV['HEROKU_APP']
res = `curl -H "Accept: application/json" -u :#{ENV['HEROKU_API_KEY']} -X GET https://api.heroku.com/apps/#{ENV['HEROKU_APP']}/releases`
last = JSON.parse(res).last
$deploy_version = last['name']
else
$deploy_version = 'local'
end
Then it's easy to display it in your app: