• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@rem Copyright 2016 gRPC authors.
2@rem
3@rem Licensed under the Apache License, Version 2.0 (the "License");
4@rem you may not use this file except in compliance with the License.
5@rem You may obtain a copy of the License at
6@rem
7@rem     http://www.apache.org/licenses/LICENSE-2.0
8@rem
9@rem Unless required by applicable law or agreed to in writing, software
10@rem distributed under the License is distributed on an "AS IS" BASIS,
11@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12@rem See the License for the specific language governing permissions and
13@rem limitations under the License.
14
15@rem Current package versions
16set VERSION=1.16.0-dev
17
18@rem Adjust the location of nuget.exe
19set NUGET=C:\nuget\nuget.exe
20set DOTNET=dotnet
21
22mkdir ..\..\artifacts
23
24@rem Collect the artifacts built by the previous build step
25mkdir nativelibs
26powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
27
28@rem Collect protoc artifacts built by the previous build step
29mkdir protoc_plugins
30powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
31
32%DOTNET% restore Grpc.sln || goto :error
33
34@rem To be able to build, we also need to put grpc_csharp_ext to its normal location
35xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release\
36
37%DOTNET% pack --configuration Release Grpc.Core --output ..\..\..\artifacts || goto :error
38%DOTNET% pack --configuration Release Grpc.Core.Testing --output ..\..\..\artifacts || goto :error
39%DOTNET% pack --configuration Release Grpc.Auth --output ..\..\..\artifacts || goto :error
40%DOTNET% pack --configuration Release Grpc.HealthCheck --output ..\..\..\artifacts || goto :error
41%DOTNET% pack --configuration Release Grpc.Reflection --output ..\..\..\artifacts || goto :error
42
43%NUGET% pack Grpc.nuspec -Version %VERSION% -OutputDirectory ..\..\artifacts || goto :error
44%NUGET% pack Grpc.Core.NativeDebug.nuspec -Version %VERSION% -OutputDirectory ..\..\artifacts
45%NUGET% pack Grpc.Tools.nuspec -Version %VERSION% -OutputDirectory ..\..\artifacts
46
47@rem copy resulting nuget packages to artifacts directory
48xcopy /Y /I *.nupkg ..\..\artifacts\ || goto :error
49
50@rem create a zipfile with the artifacts as well
51powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets_windows_dotnetcli.zip');"
52xcopy /Y /I csharp_nugets_windows_dotnetcli.zip ..\..\artifacts\ || goto :error
53
54goto :EOF
55
56:error
57echo Failed!
58exit /b %errorlevel%
59