I'd like to display the release number on a page on my site, to show the current heroku release.
My thoughts are to get it and store it in an environment variable, however I don't know how to access the release number on deployment.
Can anyone tell me how I might do this?
I've read: https://devcenter.heroku.com/articles/release-phase
and read: https://devcenter.heroku.com/articles/releases
I'm wondering if it's even possible or if I'd have to do it locally as part of a script incrementing the current version number and adding that as an environment variable. Just thought there might be a built in version
You can enable the runtime-dyno-metadata lab to inject this metadata into your applications' environment: https://devcenter.heroku.com/articles/dyno-metadata
just heroku labs:enable runtime-dyno-metadata -a <app name>, you'll need to generate a new release, either by deploying new code, or updating your config vars.
Once you've done this, you'll have access to HEROKU_RELEASE_VERSION in the env.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With