Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting the heroku build number from environment variables on the cedar stack

Tags:

heroku

I noticed that heroku has a build version number i.e. v251 when you deploy to heroku. Is there any way that I can read that from my application, perhaps an environment variable? I have a node.js app on their cedar stack.

like image 519
MonkeyBonkey Avatar asked Mar 16 '12 14:03

MonkeyBonkey


People also ask

How do I access Heroku config vars in Python?

Heroku's environment variables are called config vars. To set a config var, navigate to the Settings tab of your app's dashboard, and click Reveal Config Vars.

Does heroku read .ENV file?

Heroku Local is a command-line tool to run Procfile-backed apps. It is installed automatically as part of the Heroku CLI. Heroku Local reads configuration variables from a . env file.


2 Answers

How about using the Dyno Metadata. It looks like the data you need is then just an environment variable away.

like image 164
Jon Mountjoy Avatar answered Oct 11 '22 14:10

Jon Mountjoy


Not directly, but if you can access the Heroku API you can get it from the Heroku releases.

like image 32
Neil Middleton Avatar answered Oct 11 '22 14:10

Neil Middleton