2024-09-26 02:40:22 +00:00
|
|
|
|
#
|
2024-10-03 15:41:57 +00:00
|
|
|
|
set -e
|
2024-09-26 02:40:22 +00:00
|
|
|
|
echo "即将删除packages下除ui之外的其他目录,按y确认"
|
|
|
|
|
read -p "y/n: " confirm
|
|
|
|
|
if [ $confirm != "y" ]; then
|
|
|
|
|
echo "取消操作"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'ui' -exec rm -rf {} +
|
|
|
|
|
|
|
|
|
|
echo "删除成功"
|
2024-09-26 02:24:25 +00:00
|
|
|
|
|
|
|
|
|
echo "安装pnpm 8.15.7, 前提是已经安装了nodejs"
|
2024-10-03 15:41:57 +00:00
|
|
|
|
npm install -g pnpm@8.15.7 --registry https://registry.npmmirror.com
|
2024-09-26 02:24:25 +00:00
|
|
|
|
echo "安装依赖"
|
2024-10-03 15:41:57 +00:00
|
|
|
|
pnpm install --registry https://registry.npmmirror.com
|
2024-09-26 02:24:25 +00:00
|
|
|
|
|
|
|
|
|
echo "开始构建"
|
|
|
|
|
echo "构建certd-client"
|
|
|
|
|
cd packages/ui/certd-client
|
|
|
|
|
npm run build
|
2024-09-26 06:20:32 +00:00
|
|
|
|
cp -r dist/* ../certd-server/public
|
2024-09-26 02:24:25 +00:00
|
|
|
|
|
|
|
|
|
echo "构建certd-server"
|
|
|
|
|
cd ../certd-server
|
|
|
|
|
npm run build
|
|
|
|
|
echo "构建完成"
|
|
|
|
|
echo "启动服务"
|
|
|
|
|
npm run start
|