blob: 442e3acad28a5e23b8d0351a502b4b20c8a78071 [file] [log] [blame]
Jan Tattermusch2c084ee2016-06-28 16:54:17 -07001#!/bin/bash
2# Copyright 2016, Google Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met:
8#
9# * Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# * Redistributions in binary form must reproduce the above
12# copyright notice, this list of conditions and the following disclaimer
13# in the documentation and/or other materials provided with the
14# distribution.
15# * Neither the name of Google Inc. nor the names of its
16# contributors may be used to endorse or promote products derived from
17# this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31set -ex
32
Jan Tattermusch8a84c8c2016-09-08 21:06:10 +020033cd $(dirname $0)
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070034
Jan Tattermusch8a84c8c2016-09-08 21:06:10 +020035mkdir -p ../../artifacts/
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070036
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070037mkdir -p nativelibs/windows_x86 nativelibs/windows_x64 \
38 nativelibs/linux_x86 nativelibs/linux_x64 \
39 nativelibs/macosx_x86 nativelibs/macosx_x64
40
Jan Tattermusch8a84c8c2016-09-08 21:06:10 +020041mkdir -p protoc_plugins/windows_x86 protoc_plugins/windows_x64 \
42 protoc_plugins/linux_x86 protoc_plugins/linux_x64 \
43 protoc_plugins/macosx_x86 protoc_plugins/macosx_x64
44
45# Collect the artifacts built by the previous build step if running on Jenkins
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070046cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=windows/artifacts/* nativelibs/windows_x86 || true
47cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=windows/artifacts/* nativelibs/windows_x64 || true
48cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=linux/artifacts/* nativelibs/linux_x86 || true
49cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=linux/artifacts/* nativelibs/linux_x64 || true
50cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x86 || true
51cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x64 || true
52
Jan Tattermusch8a84c8c2016-09-08 21:06:10 +020053# Collect protoc artifacts built by the previous build step
54cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x86 || true
55cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x64 || true
56cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x86 || true
57cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x64 || true
58cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x86 || true
59cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x64 || true
60
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070061dotnet restore .
62
63dotnet pack --configuration Release Grpc.Core/project.json --output ../../artifacts
Jan Tattermusch2b2723b2017-01-30 17:30:22 +010064dotnet pack --configuration Release Grpc.Core.Testing/project.json --output ../../artifacts
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070065dotnet pack --configuration Release Grpc.Auth/project.json --output ../../artifacts
66dotnet pack --configuration Release Grpc.HealthCheck/project.json --output ../../artifacts
Jan Tattermusch69299c72016-11-29 11:06:52 +010067dotnet pack --configuration Release Grpc.Reflection/project.json --output ../../artifacts
Jan Tattermusch2c084ee2016-06-28 16:54:17 -070068
Craig Tiller5cad46e2017-01-30 15:32:24 -080069nuget pack Grpc.nuspec -Version "1.2.0-dev" -OutputDirectory ../../artifacts
70nuget pack Grpc.Tools.nuspec -Version "1.2.0-dev" -OutputDirectory ../../artifacts
Jan Tattermusch8a84c8c2016-09-08 21:06:10 +020071
72(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)