Every time I push my app to heroku I see the line
-----> Launching... done, v43
Is there a way to make that version number apear within the
After every push, run (assuming a bash shell):
heroku config:add rel=$(heroku releases | tail -2 | awk '{print $1}')
You can then just access the rel environment variable from your app.
Alternatively, if you'd like to present the date of the push, which, IMO, represents more meaningful information:
heroku config:add rel=$(heroku releases | tail -2 | awk '{print $5,$6,$7}')
Or, my favorite, which contains date and version with no whitespace:
heroku config:add rel=$(heroku releases | tail -2 | awk '{print $5"t"$6$7"."$1}')