set-version.bat 596 B

1234567891011121314151617181920
  1. @echo off
  2. chcp 65001 >nul
  3. title Apq.Cfg 版本号设置工具
  4. :: 获取脚本所在目录
  5. set "SCRIPT_DIR=%~dp0"
  6. :: 检查是否提供了参数
  7. if "%~1"=="" (
  8. :: 无参数,交互式运行
  9. powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%set-version.ps1"
  10. ) else (
  11. :: 有参数,传递给 PowerShell
  12. if "%~2"=="" (
  13. powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%set-version.ps1" -Version "%~1"
  14. ) else (
  15. powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%set-version.ps1" -Version "%~1" -Suffix "%~2"
  16. )
  17. )