Skip to content

v0.3.1: fix(frontend): declare APP_VERSION in turbo build env (#8)

Choose a tag to compare

@alonle alonle released this 17 May 20:40
· 3 commits to main since this release
13791aa
* feat(frontend): bake release tag into sidebar version

Wire the release workflow's git tag through a Docker build-arg
(APP_VERSION) into Vite's __APP_VERSION__ define, so the sidebar
in the production image reflects the tag that built it instead of
a hand-bumped root package.json.

Local pnpm dev still falls back to package.json — no process change
for dev.

* fix(frontend): declare APP_VERSION in turbo build env

Turbo runs each task in a sanitized child environment and hides any
env var not declared in turbo.json. After v0.3.0, the release image
still rendered "v0.1.0" in the sidebar because the Docker build did
set APP_VERSION=v0.3.0 in the RUN env, but Turbo stripped it before
launching Vite — so process.env.APP_VERSION was undefined and the
config fell back to root package.json (0.1.0).

Declaring "env": ["APP_VERSION"] on the build task both exposes the
var to Vite and (correctly) makes Turbo treat changes to it as a
cache-bust.