fix(dashboard): keep the v prefix on the reported platform version

The console config ConfigMap stripped the leading v (trimPrefix "v") while
the operator's COZYSTACK_VERSION and the vX.Y.Z release tags keep it, so the
dashboard displayed 1.4.0 where the operator reported v1.4.0. Keep the tag
verbatim, and build the baked VITE_APP_VERSION fallback as v$(COZYSTACK_
VERSION) too so the deploy-time and build-time version strings stay
consistent with each other and with the operator.

Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
Myasnikov DaniilandClaude Opus 4.8 committed 2026-07-06 16:49:42 +05:00
1 parent 6d3d4908de
commit 727f4e745e
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ build-console:
$(call image-tags,cozystack-ui,v$(COZYSTACK_VERSION)) \
$(call cache-args,cozystack-ui) \
--metadata-file images/console.json \
--build-arg APP_VERSION=$(COZYSTACK_VERSION) \
--build-arg APP_VERSION=v$(COZYSTACK_VERSION) \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
@@ -6,7 +6,9 @@
{{- $tag := .Values.console.image | toString | splitList "@" | first | splitList ":" | last }}
{{- $config := merge (dict) $branding }}
{{- if regexMatch "^v?[0-9]" $tag }}
{{- $_ := set $config "version" (trimPrefix "v" $tag) }}
{{- /* Keep the tag verbatim (vX.Y.Z), matching the operator's COZYSTACK_VERSION
and the vX.Y.Z release tags, rather than stripping the leading v. */}}
{{- $_ := set $config "version" $tag }}
{{- end }}
apiVersion: v1
kind: ConfigMap