mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
[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:
@@ -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
|
||||
|
||||
@@ -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 $PYLLM_APP_NAME"
|
||||
stop $PYLLM_APP_NAME
|
||||
echo "Stop success"
|
||||
;;
|
||||
reload)
|
||||
|
||||
Reference in New Issue
Block a user