Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

on Heroku how can I get the current release number of my app

Tags:

python

heroku

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

like image 507
AppHandwerker Avatar asked Oct 14 '25 04:10

AppHandwerker


1 Answers

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.

like image 160
maniacalrobot Avatar answered Oct 16 '25 16:10

maniacalrobot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!