From baae7f74b896df3154e3c34de3e516e98425a0ed Mon Sep 17 00:00:00 2001 From: zyclove Date: Fri, 14 Feb 2025 21:22:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90feat=E3=80=91Optimize=20the=20web=20ap?= =?UTF-8?q?p=20build=20script=20to=20include=20checks=20for=20the=20build?= =?UTF-8?q?=20results,=20preventing=20partial=20successes.=20(#2058)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assembly/bin/supersonic-build.sh | 7 ++++++- webapp/packages/chat-sdk/src/common/type.ts | 1 + webapp/start-fe-dev.sh | 5 ++++- webapp/start-fe-prod.sh | 8 ++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/assembly/bin/supersonic-build.sh b/assembly/bin/supersonic-build.sh index 44e94e0330..e26729588a 100755 --- a/assembly/bin/supersonic-build.sh +++ b/assembly/bin/supersonic-build.sh @@ -35,12 +35,17 @@ function buildWebapp { chmod +x $projectDir/webapp/start-fe-prod.sh cd $projectDir/webapp sh ./start-fe-prod.sh - cp -fr ./supersonic-webapp.tar.gz ${buildDir}/ # check build result if [ $? -ne 0 ]; then echo "Failed to build frontend webapp." exit 1 fi + cp -fr ./supersonic-webapp.tar.gz ${buildDir}/ + # check build result + if [ $? -ne 0 ]; then + echo "Failed to get supersonic webapp package." + exit 1 + fi echo "finished building supersonic webapp" } diff --git a/webapp/packages/chat-sdk/src/common/type.ts b/webapp/packages/chat-sdk/src/common/type.ts index 38ebbc98a2..da70d4c518 100644 --- a/webapp/packages/chat-sdk/src/common/type.ts +++ b/webapp/packages/chat-sdk/src/common/type.ts @@ -178,6 +178,7 @@ export type QueryDataType = { export type ColumnType = { authorized: boolean; name: string; + nameEn: string; bizName: string; showType: string; type: string; diff --git a/webapp/start-fe-dev.sh b/webapp/start-fe-dev.sh index 9a1faf08b8..1af0235022 100755 --- a/webapp/start-fe-dev.sh +++ b/webapp/start-fe-dev.sh @@ -19,7 +19,10 @@ cd ./packages/chat-sdk pnpm i pnpm run build - +if [ $? -ne 0 ]; then + echo "Failed to build chat sdk." + exit 1 +fi pnpm link --global cd ../supersonic-fe diff --git a/webapp/start-fe-prod.sh b/webapp/start-fe-prod.sh index a1eae9c7e6..3f60c19c78 100755 --- a/webapp/start-fe-prod.sh +++ b/webapp/start-fe-prod.sh @@ -23,6 +23,10 @@ cd ./packages/chat-sdk pnpm i pnpm run build +if [ $? -ne 0 ]; then + echo "Failed to build chat sdk." + exit 1 +fi pnpm link --global @@ -33,6 +37,10 @@ pnpm link ../chat-sdk pnpm i pnpm run build:os-local +if [ $? -ne 0 ]; then + echo "Failed to build supersonic-fe." + exit 1 +fi tar -zcvf supersonic-webapp.tar.gz ./supersonic-webapp