feat(frontend): zobrazovat verzi zapečenou při buildu místo verze z API - #336
Merged
SmallhillCZ merged 1 commit intoAug 14, 2026
Merged
Conversation
Verze se dosud načítala z backendu, takže starý načtený frontend hlásil novou verzi. Nyní se VERSION předává i do frontend fáze Dockerfile a Angular ji přes --define zapéká do bundlu jako APP_VERSION. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BntBWKggNt16Umi9uF3peY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Změny
GET /api→ApiService.info), takže starý načtený frontend (otevřená záložka přes deploy, ještě neaktivovaný service worker) hlásil už novou verzi — číslo na obrazovce nepopisovalo běžící kód.Dockerfile:ARG VERSION+ENV VERSION=$VERSIONnově i ve fázibuild-frontend(runner fázi to zůstává beze změny pro backend).frontend/package.json: build předává verzi Angularu přes--define APP_VERSION="'${VERSION:-DEV}'", takže se zapeče do bundlu.frontend/angular.json:defines výchozí hodnotou'DEV'— pokrýváng serve, CLI hodnota má přednost.frontend/src/typings.d.ts:declare const APP_VERSION: string;frontend/src/config.ts: nové poleversion(vedle ostatních build-time konstant).VersionComponentbere verzi zConfigmísto z API; odstranění úvodníhov(v4.4.0→4.4.0) zůstává, stejně jako celý service-worker update flow a otevírání changelogu.Workflows měnit netřeba —
build.ymlužVERSIONjako build-arg posílá a ten dorazí do každé fáze, která si ho deklaruje (vN.N.Nz PROD,NEXT-<sha>z NEXT). Backend siVERSIONdrží dál (logy, CLI, OpenAPI) aRootResponse.versionv API zůstává.Ověřeno lokálně (Node 24):
npm run buildzapečethis.version="DEV",VERSION=v9.9.9 npm run buildzapečethis.version="v9.9.9"dodist/browser/main-*.js.Testovací scénář
CTRL + F5⌘ Cmd + ⇧ Shift + RVerze …a odpovídá nasazenému buildu.Po otestování vždy napiš feedback, buď
Approve review, neboRequest changes. Návod zde: Jak na testování🤖 Generated with Claude Code
https://claude.ai/code/session_01BntBWKggNt16Umi9uF3peY
Generated by Claude Code