Versioning
Compass uses two complementary version identifiers.
Semver tag (git)
Format: v{MAJOR}.{MINOR}.{PATCH} — e.g. v0.5.4
- Bumped automatically on every merge to
main(patch) byrelease-on-main.yml - Minor/major bumps are manual: push a tag like
v0.6.0directly - Used to tag Docker images on Docker Hub (
switchbacktech/compass-web:0.5.4,:0.5,:latest)
BUILD_VERSION (frontend runtime)
A string baked into the web bundle at build time by packages/web/build.ts and written to build/web/version.json. Used by useVersionCheck to detect when a newer deployment is available, and displayed in the command palette under More → Version.
| Build context | Value |
|---|---|
| Tagged CI release | Semver without v — e.g. 0.5.4 (from COMPASS_BUILD_REF) |
| Local dev (git available) | Short git SHA — e.g. a1b2c3d |
| Self-hosted (no env set) | {timestamp}-self-host |
How it flows in CI
release-on-main.ymlpushesv0.5.4from itstag-releasejob.release-on-main.ymlcallspublish-docker-images.ymlwithtag=v0.5.4.publish-docker-images.ymlsetsCOMPASS_BUILD_REF=0.5.4as a Docker build arg.build.tsreadsCOMPASS_BUILD_REF, setsBUILD_VERSION = "0.5.4".- Bundle and
version.jsonboth contain"0.5.4". release-on-main.ymlcallsdeploy-staging.ymlafter Docker publishing succeeds.
Adding a new build context
To inject a custom version (e.g. a self-hosted build with a known tag):
COMPASS_BUILD_REF=my-version bun run build
The "self-host" fallback (with timestamp prefix) is only used when git is unavailable and COMPASS_BUILD_REF is not set.