33 lines
708 B
Batchfile
33 lines
708 B
Batchfile
|
:start
|
||
|
::定义版本
|
||
|
set EFCORE2=2.0.0.1
|
||
|
set EFCORE3=3.0.0.1
|
||
|
set EFCORE5=5.0.0.1
|
||
|
|
||
|
::删除所有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))
|
||
|
|
||
|
echo 清理完成
|
||
|
|
||
|
::构建
|
||
|
dotnet build -c Release
|
||
|
::推送
|
||
|
for /r %nowpath% %%i in (*.nupkg) do (dotnet nuget push %%i -k %apiKey% --source https://api.nuget.org/v3/index.json)
|
||
|
|
||
|
echo 完成
|
||
|
pause
|