gen-acpg-now.bat 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. cls
  2. @echo off
  3. ECHO. "Warning this bat will delete old acpg file!"
  4. @REM set acpg_out file path
  5. set ACPG_CONF_DIR=%~dp0\acpg
  6. @REM set out acpg code path
  7. set ACPG2JAVA=%~dp0\src\main\java\
  8. set ACPG2JAVA_FULL_PATH=%ACPG2JAVA%\com\kfzs\duanduan\datashare\provider
  9. ECHO. "Project Root: %~dp0
  10. ECHO. "==== Your set ===="
  11. ECHO. "acpg_out job dir: %ACPG_CONF_DIR%"
  12. ECHO. "out acpg code dir: %ACPG2JAVA%"
  13. ECHO. "out acpg code full dir: %ACPG2JAVA_FULL_PATH%"
  14. if NOT EXIST %~dp0%ACPG_CONF_DIR% (
  15. ECHO. "can not find %ACPG_CONF_DIR% for job please check"
  16. goto update_error
  17. )
  18. if NOT EXIST %ACPG_CONF_DIR%\acpg-cli-1.12.0.jar (
  19. ECHO. "can not find acpg-cli-1.12.0.jar at %ACPG_CONF_DIR% root path. stop update!"
  20. goto update_error
  21. )
  22. if EXIST %~dp0%ACPG2JAVA_FULL_PATH% (
  23. ECHO. "find old acpg_out out folder try to delete"
  24. rd /s /q %~dp0%ACPG2JAVA_FULL_PATH%
  25. PING 127.0.0.1 -n 3 >nul
  26. )
  27. mkdir %ACPG2JAVA_FULL_PATH%
  28. ECHO. "==== Show Set End ==="
  29. ECHO. "==== Start update acpg_out"
  30. @REM start .\%ACPG_CONF_DIR%\acpg-cli.bat
  31. %ACPG_CONF_DIR%\acpg-cli.bat -i %ACPG_CONF_DIR% -o %ACPG2JAVA%
  32. ECHO. "==== End update acpg_out"
  33. goto update_success
  34. :update_success
  35. ECHO. "update success"
  36. ECHO. "File at %~dp0%ACPG2JAVA%"
  37. :update_error
  38. ECHO. "update error please see CLI out"