Skip to content

Commit

Permalink
【feat】Optimize the web app build script to include checks for the bui…
Browse files Browse the repository at this point in the history
…ld results, preventing partial successes. (#2058)
  • Loading branch information
zyclove authored Feb 14, 2025
1 parent e9d9c45 commit baae7f7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
7 changes: 6 additions & 1 deletion assembly/bin/supersonic-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
1 change: 1 addition & 0 deletions webapp/packages/chat-sdk/src/common/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export type QueryDataType = {
export type ColumnType = {
authorized: boolean;
name: string;
nameEn: string;
bizName: string;
showType: string;
type: string;
Expand Down
5 changes: 4 additions & 1 deletion webapp/start-fe-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions webapp/start-fe-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit baae7f7

Please sign in to comment.