2021-01-26 16:35:16 +08:00
|
|
|
:start
|
|
|
|
::定义版本
|
2021-12-22 17:04:38 +08:00
|
|
|
set EFCORE2=2.3.1.93
|
|
|
|
set EFCORE3=3.3.1.93
|
|
|
|
set EFCORE5=5.3.1.93
|
|
|
|
set EFCORE6=6.3.1.93
|
2021-01-26 16:35:16 +08:00
|
|
|
|
|
|
|
::删除所有bin与obj下的文件
|
|
|
|
@echo off
|
|
|
|
echo input nuget api key
|
|
|
|
set /p apiKey=
|
|
|
|
|
|
|
|
IF "apiKey"=="" (
|
|
|
|
ECHO No NuGet API key provided &goto :start
|
|
|
|
)
|
|
|
|
|
|
|
|
set nowpath=%cd%
|
|
|
|
cd \
|
|
|
|
cd %nowpath%
|
|
|
|
::delete specify file(*.pdb,*.vshost.*)
|
|
|
|
for /r %nowpath% %%i in (*.pdb,*.vshost.*) do (del %%i && echo delete %%i)
|
|
|
|
|
|
|
|
::delete specify folder(obj,bin)
|
|
|
|
for /r %nowpath% %%i in (obj,bin) do (IF EXIST %%i (RD /s /q %%i && echo delete %%i))
|
|
|
|
|
2021-02-02 21:50:22 +08:00
|
|
|
echo clear complete
|
2021-01-26 16:35:16 +08:00
|
|
|
|
|
|
|
::构建
|
|
|
|
dotnet build -c Release
|
2021-02-02 21:50:22 +08:00
|
|
|
::publishing....
|
2021-01-26 16:35:16 +08:00
|
|
|
for /r %nowpath% %%i in (*.nupkg) do (dotnet nuget push %%i -k %apiKey% --source https://api.nuget.org/v3/index.json)
|
|
|
|
|
2021-02-02 21:50:22 +08:00
|
|
|
echo complete
|
2021-01-26 16:35:16 +08:00
|
|
|
pause
|