docs: capture todo - Derive the summercms.io landing version from go.mod

This commit is contained in:
Jakub Zych
2026-10-28 23:41:08 +01:00
parent 860c41d829
commit 13aa5f3227

View File

@@ -0,0 +1,31 @@
---
created: 2026-10-28T22:40:21.116Z
title: Derive the summercms.io landing version from go.mod
area: consumers
severity: minor
g15office: y7b3ix5f
files:
- ../sm-summercmsio-app/vue-summercmsio-app/i18n/locales/en.json:11
- ../sm-summercmsio-app/vue-summercmsio-app/i18n/locales/en.json:29
- ../sm-summercmsio-app/vue-summercmsio-app/i18n/locales/en.json:172
- ../sm-summercmsio-app/scripts/build.sh
- ../sm-summercmsio-app/vue-summercmsio-app/nuxt.config.ts
- ../sm-summercmsio-app/go.mod
---
## Problem
The summercms.io landing hard-codes the framework version in three strings in `vue-summercmsio-app/i18n/locales/en.json`: the header pill (`"ALPHA 0.5"`), the hero button (`"Alpha 0.5 is out"`) and the start-section note (`"Alpha 0.5 is for early adopters..."`). They are bumped by hand (the "Alpha 0.5 copy" commit), so the site drifts from the release: production still shows 0.4 because that bump hasn't been deployed. The version shown should follow the framework release automatically.
## Solution
Use the framework the binary is built against, the `require git.golem15.com/golem15/summercms vX.Y.Z` line in the app's `go.mod`, as the single source:
- `scripts/build.sh` (which already resolves that tag in release mode) reads it and exports `NUXT_PUBLIC_SUMMERCMS_VERSION` to both `pnpm generate` and `pnpm build:changelog`.
- `nuxt.config.ts`: `runtimeConfig.public.summercmsVersion`, shown as major.minor (`0.5`). Dev builds need a fallback, for example reading `go.mod` directly.
- The strings take a `{version}` placeholder (`"ALPHA {version}"`, ...), rendered with `t(key, { version })`.
- The plugin build test (`SUMMERCMS_REQUIRE_BUILD=1`) asserts that the built pill matches `go.mod`, so a stale version fails the build.
The landing is prerendered, so the version updates on each rebuild and deploy, not at runtime. That is enough, because every framework bump goes through `go.mod` and a rebuild anyway.
Notes: `go.mod` requires v0.5.0 while the latest framework tag is v0.5.3; with major.minor both show 0.5. Decide whether the patch version is wanted. Do this after quick 261028-wqu (changelog dropdown), which edits the same `en.json` and `SiteHeader.vue`.