From 2a867f2a71bac49285a7143bc88f4fdd8f1588d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Thu, 26 Oct 2023 08:20:32 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20533:=20STG=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=AE=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=81=8C?= =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=A3=E3=81=9F=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=92=E8=AA=AD=E3=81=BE=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2956: STGビルドの環境変数が間違ったファイルを読まないよう修正する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2956) - .envを上書きする方法から、VITEが本来想定しているビルド指定方法へ修正 - STGパイプラインでも `npm run build:stg` を使用するよう修正 ## レビューポイント - 修正方針に問題はないか ## 動作確認状況 - ローカルで動作する所まで確認 --- azure-pipelines-staging.yml | 4 ++-- dictation_client/package.json | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-staging.yml b/azure-pipelines-staging.yml index b8e341e..faef499 100644 --- a/azure-pipelines-staging.yml +++ b/azure-pipelines-staging.yml @@ -122,7 +122,7 @@ jobs: displayName: Bash Script inputs: targetType: inline - script: cd dictation_client && cp -f .env.$(environment) .env && npm run build + script: cd dictation_client && npm run build:stg - task: ArchiveFiles@2 inputs: rootFolderOrFile: dictation_client/build @@ -167,7 +167,7 @@ jobs: displayName: Bash Script inputs: targetType: inline - script: cd dictation_client && cp -f .env.$(environment) .env && npm run build + script: cd dictation_client && npm run build:prod - task: ArchiveFiles@2 inputs: rootFolderOrFile: dictation_client/build diff --git a/dictation_client/package.json b/dictation_client/package.json index b2283f6..8da7f1a 100644 --- a/dictation_client/package.json +++ b/dictation_client/package.json @@ -7,9 +7,10 @@ }, "scripts": { "start": "vite", - "build": "tsc && vite build", - "build:prod": "tsc && vite build", - "build:local": "tsc && vite build && sh localdeploy.sh", + "build": "tsc && vite build -- --mode development", + "build:stg": "tsc && vite build -- --mode staging", + "build:prod": "tsc && vite build -- --mode production", + "build:local": "tsc && vite build -- --mode development && sh localdeploy.sh", "preview": "vite preview", "typecheck": "tsc --noEmit", "codegen": "sh codegen.sh",