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
//JYC
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
//JYC
RENDER_GIT_COMMIT
could work for you.
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…
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.
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
Great option Stefan. Thank you.
Thx also for the help Friendliest.app