-
Notifications
You must be signed in to change notification settings - Fork 10
/
nuget deploy.cmd
33 lines (24 loc) · 1 KB
/
nuget deploy.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
del "Bia.Countries\bin\Release\*.nupkg"
del "%~dp0*.nupkg"
for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" set InstallDir=%%j
)
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" -t:Pack -p:Configuration=Release "Bia.Countries\Bia.Countries.csproj"
)
copy Bia.Countries\bin\Release\*.nupkg %~dp0
@echo.
@echo ------------------------------------------------
@echo Finish package create
@echo ------------------------------------------------
@echo.
pause
cd %~dp0
forfiles /m *.nupkg /c "cmd /c nuget.exe push @FILE -ApiKey XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX -Source https://www.nuget.org/api/v2/package -Verbosity detailed"
@echo.
@echo ------------------------------------------------
@echo Finish publish
@echo ------------------------------------------------
@echo.
pause