No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

34 líneas
676 B

  1. @echo off
  2. set "PROJECT_PATH=C:\dev\FPSMS-backend"
  3. set "SERVICE_NAME=FP-backend"
  4. echo.
  5. echo [1/4] Stopping service %SERVICE_NAME% ...
  6. net stop "%SERVICE_NAME%" >nul 2>&1
  7. echo.
  8. echo [2/4] Waiting 5 seconds...
  9. timeout /t 5 >nul
  10. echo.
  11. echo [3/4] Building new JAR...
  12. cd /d "%PROJECT_PATH%"
  13. call gradlew clean bootJar --no-daemon
  14. if %errorlevel% neq 0 (
  15. echo.
  16. echo Build FAILED! Service not restarted.
  17. timeout /t 10
  18. exit /b 1
  19. )
  20. echo.
  21. echo [4/4] Starting service %SERVICE_NAME% ...
  22. net start "%SERVICE_NAME%"
  23. echo.
  24. echo SUCCESS! %SERVICE_NAME% is running with the new JAR!
  25. echo Deployment completed: %date% %time%
  26. echo Closing in 5 seconds...
  27. timeout /t 5 >nul