Skip to content

fix: use HEROKU_RELEASE_VERSION for static asset cache-busting#49

Merged
mroderick merged 1 commit into
mainfrom
fix/heroku-release-version
Jul 19, 2026
Merged

fix: use HEROKU_RELEASE_VERSION for static asset cache-busting#49
mroderick merged 1 commit into
mainfrom
fix/heroku-release-version

Conversation

@mroderick

@mroderick mroderick commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Problem

PR #48 introduced HEROKU_SLUG_COMMIT for cache-busting static assets. This env var requires the runtime-dyno-metadata lab feature, which was not enabled or documented. The version always falls back to dev.

Solution

Switch to HEROKU_RELEASE_VERSION (also provided by runtime-dyno-metadata) and document the lab feature requirement in the Heroku setup docs.

I deployed this branch to Heroku (codebar-auth-production), to confirm that it works.

image

Changes

  • src/app/components/layout.js — simplified STATIC_VERSION to HEROKU_RELEASE_VERSION || "dev", removed unused SOURCE_VERSION and HEROKU_SLUG_COMMIT fallbacks
  • docs/heroku-setup.md — added heroku labs:enable runtime-dyno-metadata to setup steps, added HEROKU_RELEASE_VERSION to the environment variables table

Prerequisite

The runtime-dyno-metadata lab must be enabled on all Heroku environments. It is already enabled on production:

heroku labs:enable runtime-dyno-metadata -a codebar-auth-production

HEROKU_SLUG_COMMIT requires runtime-dyno-metadata but was undocumented.
Switch to HEROKU_RELEASE_VERSION and document the lab feature requirement.
@mroderick
mroderick marked this pull request as ready for review July 19, 2026 12:46
@mroderick
mroderick requested a review from till July 19, 2026 12:46
@mroderick
mroderick merged commit 7a80274 into main Jul 19, 2026
7 checks passed
@mroderick
mroderick deleted the fix/heroku-release-version branch July 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants