• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2020 The gRPC Authors
3#
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
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15
16set -ex
17
18cd "$(dirname "$0")"
19
20mkdir -p ../../artifacts
21
22# Collect the artifacts built by the previous build step
23mkdir -p nativelibs
24cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/csharp_ext_* nativelibs || true
25
26# Collect protoc artifacts built by the previous build step
27mkdir -p protoc_plugins
28cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/protoc_* protoc_plugins || true
29
30# Add current timestamp to dev nugets
31./expand_dev_version.sh
32
33dotnet restore Grpc.sln
34
35# To be able to build the Grpc.Core project, we also need to put grpc_csharp_ext to where Grpc.Core.csproj
36# expects it.
37mkdir -p ../../cmake/build
38cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../cmake/build
39
40dotnet pack --configuration Release Grpc.Core.Api --output ../../../artifacts
41dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
42dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts
43dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
44dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
45dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
46dotnet pack --configuration Release Grpc.Tools --output ../../../artifacts
47# rem build auxiliary packages
48dotnet pack --configuration Release Grpc --output ../../../artifacts
49dotnet pack --configuration Release Grpc.Core.NativeDebug --output ../../../artifacts
50dotnet pack --configuration Release Grpc.Core.Xamarin --output ../../../artifacts
51
52# Create a zipfile with all the nugets we just created
53cd ../../artifacts
54zip csharp_nugets_windows_dotnetcli.zip *.nupkg
55