Environment Variables - Version number and/or date of deploy

Hi there,
It it possible to get Environment Variables with the version deployed? (a number for example?) and/or the date of deployment?

Thx a lot


RENDER_GIT_COMMIT could work for you.

see https://render.com/docs/environment-variables

Thx for your answer Stefan.
I saw this one, but it’s not really meaningful for my users.

I would like them to see that the website was updated 1 days ago, 2 hours ago…

1 Like

If you can make a git call from your application, you could use the RENDER_GIT_COMMIT variable.

Something like:
git log -1 --format="%ar" [RENDER_GIT_COMMIT]

That should return the relative timestamp of the git commit from the SHA in the variable.

1 Like

Or @jycouet can put something like the command below into the build/start script or command:

export DEPLOY_DATETIME=$(date)

Then read the content of that env var inside the app. Of course, the content of the var can be easily adjusted with the params of the date command.

Would this work?


Or that because it’s a much cleaner answer :slight_smile:

1 Like

Great option Stefan. Thank you.
Thx also for the help Friendliest.app

1 Like