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 15set DOTNET=dotnet 16 17mkdir ..\..\artifacts 18 19@rem Collect the artifacts built by the previous build step 20mkdir nativelibs 21powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs" 22 23@rem Collect protoc artifacts built by the previous build step 24mkdir protoc_plugins 25powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins" 26 27@rem Add current timestamp to dev nugets 28expand_dev_version.sh 29 30%DOTNET% restore Grpc.sln || goto :error 31 32@rem To be able to build, we also need to put grpc_csharp_ext to its normal location 33xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release\ 34 35%DOTNET% pack --configuration Release Grpc.Core.Api --output ..\..\..\artifacts || goto :error 36%DOTNET% pack --configuration Release Grpc.Core --output ..\..\..\artifacts || goto :error 37%DOTNET% pack --configuration Release Grpc.Core.Testing --output ..\..\..\artifacts || goto :error 38%DOTNET% pack --configuration Release Grpc.Auth --output ..\..\..\artifacts || goto :error 39%DOTNET% pack --configuration Release Grpc.HealthCheck --output ..\..\..\artifacts || goto :error 40%DOTNET% pack --configuration Release Grpc.Reflection --output ..\..\..\artifacts || goto :error 41%DOTNET% pack --configuration Release Grpc.Tools --output ..\..\..\artifacts || goto :error 42@rem build auxiliary packages 43%DOTNET% pack --configuration Release Grpc --output ..\..\..\artifacts || goto :error 44%DOTNET% pack --configuration Release Grpc.Core.NativeDebug --output ..\..\..\artifacts || goto :error 45 46@rem copy resulting nuget packages to artifacts directory 47xcopy /Y /I *.nupkg ..\..\artifacts\ || goto :error 48 49@rem create a zipfile with the artifacts as well 50powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets_windows_dotnetcli.zip');" 51xcopy /Y /I csharp_nugets_windows_dotnetcli.zip ..\..\artifacts\ || goto :error 52 53goto :EOF 54 55:error 56echo Failed! 57exit /b %errorlevel% 58