push-nuget.bat 457 B

123456789101112131415
  1. @echo off
  2. chcp 65001 >nul
  3. title Apq.Cfg NuGet 发布工具
  4. :: 获取脚本所在目录
  5. set "SCRIPT_DIR=%~dp0"
  6. :: 检查是否提供了参数
  7. if "%~1"=="" (
  8. :: 无参数,交互式运行
  9. powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%push-nuget.ps1"
  10. ) else (
  11. :: 有参数,传递给 PowerShell (第一个参数为 API Key)
  12. powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%push-nuget.ps1" -ApiKey "%~1"
  13. )