From 09566cce3b6750ad1f6ef2faad24b81d21dfd668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:27:21 +0300 Subject: [PATCH] =?UTF-8?q?prebuild=20kald=C4=B1r=C4=B1ld=C4=B1=20build:pr?= =?UTF-8?q?oduction=20eklendi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Kurs.Platform.Ui.Dockerfile | 2 +- ui/package.json | 4 ++-- ui/scripts/generate-version.sh | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/Kurs.Platform.Ui.Dockerfile b/ui/Kurs.Platform.Ui.Dockerfile index adf7ab15..6a21be95 100644 --- a/ui/Kurs.Platform.Ui.Dockerfile +++ b/ui/Kurs.Platform.Ui.Dockerfile @@ -12,5 +12,5 @@ RUN npm i && \ npm install @rollup/rollup-linux-x64-musl --save-dev && \ npm rebuild rollup COPY . . -RUN npm run build -- --mode $ENV +RUN npm run build:production -- --mode $ENV CMD ["npm", "run", "preview"] diff --git a/ui/package.json b/ui/package.json index 06e8e400..0a8b7a17 100644 --- a/ui/package.json +++ b/ui/package.json @@ -6,8 +6,8 @@ "type": "module", "scripts": { "start": "vite", - "prebuild": "node scripts/generate-version.js", - "build": "vite build", + "build": "node scripts/generate-version.js && vite build", + "build:production": "vite build", "preview": "vite preview", "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json", "lint:fix": "npm run lint -- --fix", diff --git a/ui/scripts/generate-version.sh b/ui/scripts/generate-version.sh index 0fa47aa2..c42f5fb3 100644 --- a/ui/scripts/generate-version.sh +++ b/ui/scripts/generate-version.sh @@ -5,8 +5,9 @@ echo "> version.json oluşturuluyor..." # En yeni tag en üstte olsun VERSIONS=$(git tag --sort=-creatordate) +ROOT_COMMIT=$(git rev-parse --short HEAD) -OUTPUT="{\"releases\":[" +OUTPUT="{\"commit\":\"$ROOT_COMMIT\",\"releases\":[" FIRST=true for TAG in $VERSIONS; do