30.nuget-pack.bat 520 B

1234567891011121314151617181920212223
  1. @echo off
  2. ::1 get basePath
  3. set curPath=%cd%
  4. cd /d "%~dp0"
  5. cd /d ../../..
  6. set basePath=%cd%
  7. set nugetPath=%basePath%/Publish/release/release/nuget
  8. ::2 find nuget projects and pack
  9. for /f "delims=" %%f in ('findstr /M /s /i "<pack>nuget</pack>" *.csproj') do (
  10. echo pack %basePath%\%%f\..
  11. cd /d "%basePath%\%%f\.."
  12. dotnet build --configuration Release
  13. dotnet pack --configuration Release --output "%nugetPath%"
  14. @if errorlevel 1 (echo . & echo . & echo error & pause)
  15. )
  16. echo %~n0.bat success
  17. cd /d "%curPath%"