Merged PR 763: ツールをexeとしてビルドできるビルドコマンドを整備する

## 概要
[Task3742: ツールをexeとしてビルドできるビルドコマンドを整備する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3742)

- データ移行ツールフォルダの中に`tool`フォルダを掘って、実行ファイル形式で配置されるようにしました。
  - コンテナ内からはサーバー側の`build:exe`コマンドでビルドできるようにしています。
  - コンテナ外からサーバー/クライアント一括でビルドできるスクリプトを配置しています。
※toolフォルダがあればツールとして実行できる想定です。

## レビューポイント
- exe化のイメージは認識通りでしょうか?

## UIの変更
- なし

## 動作確認状況
- ローカルでビルドできることを確認
This commit is contained in:
makabe.t 2024-02-21 00:11:19 +00:00
parent a9aca6e4ff
commit 5adf7ed12e
4 changed files with 21 additions and 0 deletions

1
data_migration_tools/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/tool*

Binary file not shown.

View File

@ -0,0 +1,8 @@
# 移行ツールをビルドする
# docker ps
$clientContainerName = "client_devcontainer-client-1"
$serverContainerName = "server_devcontainer-server-1"
docker exec -t $clientContainerName sudo npm run build:local
docker exec -t $serverContainerName npm run build:exe

View File

@ -0,0 +1,12 @@
if [ ! -d "../tool" ]; then
mkdir "../tool"
echo "フォルダが作成されました。"
else
rm -f ../tool/ODMS_DataTool.exe
fi
unzip ../baseNode.zip -d ../tool
ncc build dist/main.js -o dist_single -a
npx -y postject ../tool/ODMS_DataTool.exe NODE_JS_CODE dist_single/index.js --sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --overwrite
cp -r build ../tool
cp .env ../tool
cp .env.local.example ../tool