随笔- 191  文章- 0  评论- 3  阅读- 59242 
复制代码
@echo off
echo "please make sure you update your yml config file!!!"

set current_dir=%cd%
set client_dir=D:\Desktop\test\zhiyi6\zhiyiFrontend
set admin_dir=D:\Desktop\test\zhiyi6\zhiyiAdmin

:restart

echo "please select your option:"
echo "0. close running java.exe"
echo "1. pack client frontend"
echo "2. pack admin frontend"
echo "3. pack backend"
echo "4. send client to test folder"
echo "5. send admin to test folder"
echo "6. send backend to test folder"
echo "7. start backend"
echo "8. reload nginx"
echo "9. exit after execute!"
set /p options=

echo your option is: %options%


echo %options% | findstr "0" >nul && (
    echo "close java.exe"
    ssh administrator@192.168.50.200 "taskkill -f -im java.exe"
)

echo %options% | findstr "1" >nul && (
    echo "pack client frontend"
    cd %client_dir% && call npm run build
)

echo %options% | findstr "2" >nul && (
    echo "pack admin frontend"
    cd %admin_dir% && call npm run build
)

echo %options% | findstr "3" >nul && (
    echo "pack backend"
    cd %current_dir% && call mvn clean package
)

echo %options% | findstr "4" >nul && (
    echo "send client to test folder"
    scp -r %client_dir%/client administrator@192.168.50.200:E:\zhiyi7\nginx\html\
)
echo %options% | findstr "5" >nul && (
    echo "send admin to test folder"
    scp -r %admin_dir%/admin administrator@192.168.50.200:E:\zhiyi7\nginx\html\
)
echo %options% | findstr "6" >nul && (
    echo "send backend to test folder"
    scp %current_dir%/scaffold-web/target/scaffold-web.jar administrator@192.168.50.200:E:\zhiyi7\java\
)
echo %options% | findstr "7" >nul && (
    echo "start backend"
    start ssh administrator@192.168.50.200 "java -jar E:\zhiyi7\java\scaffold-web.jar"
)
echo %options% | findstr "8" >nul && (
    echo "reload nginx"
    ssh administrator@192.168.50.200 "cd E:/zhiyi7/nginx && nginx.exe -s reload"
)

echo %options% | findstr "9" >nul && exit

echo "script ending..."
goto restart
pause
exit
复制代码

 

 posted on   laremehpe  阅读(12)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示