2 # Copyright 2020 The gRPC Authors
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 mkdir -p ../../artifacts
22 # Collect the artifacts built by the previous build step
24 cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/csharp_ext_* nativelibs || true
26 # Collect protoc artifacts built by the previous build step
27 mkdir -p protoc_plugins
28 cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/protoc_* protoc_plugins || true
30 # Add current timestamp to dev nugets
31 ./expand_dev_version.sh
33 dotnet restore Grpc.sln
35 # To be able to build the Grpc.Core project, we also need to put grpc_csharp_ext to where Grpc.Core.csproj
37 mkdir -p ../../cmake/build
38 cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../cmake/build
40 dotnet pack --configuration Release Grpc.Core.Api --output ../../../artifacts
41 dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
42 dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts
43 dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
44 dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
45 dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
46 dotnet pack --configuration Release Grpc.Tools --output ../../../artifacts
47 # rem build auxiliary packages
48 dotnet pack --configuration Release Grpc --output ../../../artifacts
49 dotnet pack --configuration Release Grpc.Core.NativeDebug --output ../../../artifacts
50 dotnet pack --configuration Release Grpc.Core.Xamarin --output ../../../artifacts
52 # Create a zipfile with all the nugets we just created
54 zip csharp_nugets_windows_dotnetcli.zip *.nupkg