Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2016 gRPC authors. |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 15 | |
| 16 | set -ex |
| 17 | |
Jan Tattermusch | 8a84c8c | 2016-09-08 21:06:10 +0200 | [diff] [blame] | 18 | cd $(dirname $0) |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 19 | |
Jan Tattermusch | 8a84c8c | 2016-09-08 21:06:10 +0200 | [diff] [blame] | 20 | mkdir -p ../../artifacts/ |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 21 | |
Jan Tattermusch | d71a631 | 2017-04-21 17:33:40 +0200 | [diff] [blame] | 22 | # Collect the artifacts built by the previous build step |
| 23 | mkdir -p nativelibs |
| 24 | cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 25 | |
Jan Tattermusch | 8a84c8c | 2016-09-08 21:06:10 +0200 | [diff] [blame] | 26 | # Collect protoc artifacts built by the previous build step |
Jan Tattermusch | d71a631 | 2017-04-21 17:33:40 +0200 | [diff] [blame] | 27 | mkdir -p protoc_plugins |
| 28 | cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true |
Jan Tattermusch | 8a84c8c | 2016-09-08 21:06:10 +0200 | [diff] [blame] | 29 | |
Jan Tattermusch | 8b43521 | 2017-04-05 13:34:37 +0200 | [diff] [blame] | 30 | dotnet restore Grpc.sln |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 31 | |
Jan Tattermusch | 8b43521 | 2017-04-05 13:34:37 +0200 | [diff] [blame] | 32 | # To be able to build, we also need to put grpc_csharp_ext to its normal location |
| 33 | mkdir -p ../../libs/opt |
Jan Tattermusch | d71a631 | 2017-04-21 17:33:40 +0200 | [diff] [blame] | 34 | cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt |
Jan Tattermusch | 8b43521 | 2017-04-05 13:34:37 +0200 | [diff] [blame] | 35 | |
Jan Tattermusch | 905f418 | 2017-05-23 22:34:14 +0200 | [diff] [blame] | 36 | dotnet pack --configuration Release Grpc.Core --output ../../../artifacts |
| 37 | dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts |
| 38 | dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts |
| 39 | dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts |
| 40 | dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts |
Jan Tattermusch | 2c084ee | 2016-06-28 16:54:17 -0700 | [diff] [blame] | 41 | |
murgatroid99 | 9887379 | 2017-10-02 17:28:27 -0700 | [diff] [blame] | 42 | nuget pack Grpc.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts |
| 43 | nuget pack Grpc.Tools.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts |
Jan Tattermusch | 8a84c8c | 2016-09-08 21:06:10 +0200 | [diff] [blame] | 44 | |
| 45 | (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) |