[improvement](project) If there are any failed operations during the build process, stop subsequent operations and issue a unified 'stop' command. (#498)

This commit is contained in:
lexluo09
2023-12-12 17:13:57 +08:00
committed by GitHub
parent 86c2f96942
commit 5c96d75d39
2 changed files with 14 additions and 11 deletions

View File

@@ -10,10 +10,13 @@ cd $baseDir
#1. build backend java modules
rm -fr ${buildDir}/*.tar.gz
rm -fr dist
set +x
mvn -f $baseDir/../ clean package -DskipTests
# check build result
if [ $? -ne 0 ]; then
echo "Failed to build backend Java modules."
exit 1
fi
#2. move package to build
cp $baseDir/../launchers/semantic/target/*.tar.gz ${buildDir}/supersonic-semantic.tar.gz
@@ -26,6 +29,11 @@ cd ../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
#4. copy webapp to java classpath
cd $buildDir
tar xvf supersonic-webapp.tar.gz

View File

@@ -108,15 +108,10 @@ case "$command" in
echo "Start success"
;;
stop)
if [ "$service" == $PYLLM_SERVICE ]; then
echo "Stopping $app_name"
stop $app_name
echo "Stopping $STANDALONE_APP_NAME"
stop $STANDALONE_APP_NAME
else
echo "Stopping $app_name"
stop ${app_name}
fi
echo "Stopping $app_name"
stop $app_name
echo "Stopping $PYLLM_APP_NAME"
stop $PYLLM_APP_NAME
echo "Stop success"
;;
reload)