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