Export a new environment variable at runtime, eg
RENDER_RELEASE
, that provides a simple integer release number.
The release number should be incremented by render:
* Upon any deploy
* Upon any config change (settings/secrets/instance size)
Example:
* Initial deploy:
RENDER_RELEASE=v1
* Next deploy:
RENDER_RELEASE=v2
* Env setting changed:
RENDER_RELEASE=v3
Why:
This is similar to
HEROKU_RELEASE
, which provides a simple rollup for "the environment" at runtime. We leverage this to tag e.g. our crash logs to sentry, making it very easy to reverse back to "how was prod configured at the time?"
We also sometimes use this release in forever-cacheable asset paths, for similar reasons.