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