fix(version): read CI_COMMIT_TAG as source of truth, package.json as fallback
Previously: vite read package.json.version only, requiring manual bump before each tag pipeline (manual sync ломалось — MR !44 пример костыля). Now: vite reads CI_COMMIT_TAG (passed via Dockerfile ARG GIT_TAG from .gitlab-ci.yml .docker_base) → strips 'v' prefix → exposes как __APP_TAG__. 'none' sentinel filtered → empty string → fallback к package.json. VersionBadge priority chain: 1. serverTag (что прод RUNS, через /api/v1/version) 2. clientTag (что build'илось на tag pipeline) 3. v${clientVersion} (package.json fallback floor для local / branch) Dockerfile: add ARG GIT_TAG=none, ENV CI_COMMIT_TAG=$GIT_TAG (mirrors существующий pattern с GIT_COMMIT → CI_COMMIT_SHORT_SHA). Revert package.json 1.3.1 → 1.2.0 (manual bump из MR !44). Версия теперь follows tag, не наоборот.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ordinis-admin-ui",
|
||||
"private": true,
|
||||
"version": "1.3.1",
|
||||
"version": "1.2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user