OLD | NEW |
(Empty) | |
| 1 @rem Builds gRPC NuGet packages |
| 2 |
| 3 @rem Current package versions |
| 4 set VERSION=0.13.1 |
| 5 set PROTOBUF_VERSION=3.0.0-beta2 |
| 6 |
| 7 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to
have prerelease suffix as well. |
| 8 set VERSION_WITH_BETA=%VERSION%-beta |
| 9 |
| 10 @rem Adjust the location of nuget.exe |
| 11 set NUGET=C:\nuget\nuget.exe |
| 12 |
| 13 @rem Collect the artifacts built by the previous build step if running on Jenkin
s |
| 14 @rem TODO(jtattermusch): is there a better way to do this? |
| 15 xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\*
grpc.native.csharp\windows_x86\ |
| 16 xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\*
grpc.native.csharp\windows_x64\ |
| 17 xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* gr
pc.native.csharp\linux_x86\ |
| 18 xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* gr
pc.native.csharp\linux_x64\ |
| 19 xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* gr
pc.native.csharp\macosx_x86\ |
| 20 xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* gr
pc.native.csharp\macosx_x64\ |
| 21 |
| 22 @rem Collect protoc artifacts built by the previous build step |
| 23 xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\*
protoc_plugins\windows_x86\ |
| 24 xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=windows\artifacts\*
protoc_plugins\windows_x64\ |
| 25 xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=linux\artifacts\* pr
otoc_plugins\linux_x86\ |
| 26 xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=linux\artifacts\* pr
otoc_plugins\linux_x64\ |
| 27 xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=macos\artifacts\* pr
otoc_plugins\macosx_x86\ |
| 28 xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=macos\artifacts\* pr
otoc_plugins\macosx_x64\ |
| 29 |
| 30 @rem Fetch all dependencies |
| 31 %NUGET% restore ..\..\vsprojects\grpc_csharp_ext.sln || goto :error |
| 32 %NUGET% restore Grpc.sln || goto :error |
| 33 |
| 34 setlocal |
| 35 |
| 36 @call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" x86 |
| 37 |
| 38 @rem We won't use the native libraries from this step, but without this Grpc.sln
will fail. |
| 39 msbuild ..\..\vsprojects\grpc_csharp_ext.sln /p:Configuration=Release /p:Platfor
mToolset=v120 || goto :error |
| 40 |
| 41 msbuild Grpc.sln /p:Configuration=ReleaseSigned || goto :error |
| 42 |
| 43 endlocal |
| 44 |
| 45 %NUGET% pack grpc.native.csharp\grpc.native.csharp.nuspec -Version %VERSION% ||
goto :error |
| 46 %NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :err
or |
| 47 %NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :err
or |
| 48 %NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION
_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error |
| 49 %NUGET% pack Grpc.nuspec -Version %VERSION% || goto :error |
| 50 %NUGET% pack Grpc.Tools.nuspec -Version %VERSION% || goto :error |
| 51 |
| 52 @rem copy resulting nuget packages to artifacts directory |
| 53 xcopy /Y /I *.nupkg ..\..\artifacts\ |
| 54 |
| 55 @rem create a zipfile with the artifacts as well |
| 56 powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [Sys
tem.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nuge
ts.zip');" |
| 57 xcopy /Y /I csharp_nugets.zip ..\..\artifacts\ |
| 58 |
| 59 goto :EOF |
| 60 |
| 61 :error |
| 62 echo Failed! |
| 63 exit /b %errorlevel% |
OLD | NEW |