From 3294474d154b8c9a2cd4caf78cd8f13e6cfe48fb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 21 Apr 2017 16:49:32 +0200 Subject: adjust package build scripts to new paths --- .../csharp/build_packages_dotnetcli.bat.template | 21 +++++----------- .../csharp/build_packages_dotnetcli.sh.template | 28 +++++----------------- 2 files changed, 12 insertions(+), 37 deletions(-) (limited to 'templates') diff --git a/templates/src/csharp/build_packages_dotnetcli.bat.template b/templates/src/csharp/build_packages_dotnetcli.bat.template index 91808e0d26..3db1e0ac3d 100755 --- a/templates/src/csharp/build_packages_dotnetcli.bat.template +++ b/templates/src/csharp/build_packages_dotnetcli.bat.template @@ -38,29 +38,20 @@ set -ex - mkdir -p ..\..\artifacts${"\\"} + mkdir ..\..\artifacts @rem Collect the artifacts built by the previous build step if running on Jenkins - @rem TODO(jtattermusch): is there a better way to do this? - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* nativelibs\windows_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* nativelibs\windows_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* nativelibs\linux_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* nativelibs\linux_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x64${"\\"} + mkdir nativelibs + powershell -Command "cp -r ..\..\platform=*\artifacts\csharp_ext_* nativelibs" @rem Collect protoc artifacts built by the previous build step - xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=linux\artifacts\* protoc_plugins\linux_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=linux\artifacts\* protoc_plugins\linux_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=macos\artifacts\* protoc_plugins\macosx_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=protoc,platform=macos\artifacts\* protoc_plugins\macosx_x64${"\\"} + mkdir protoc_plugins + powershell -Command "cp -r ..\..\platform=*\artifacts\protoc_* protoc_plugins" %%DOTNET% restore Grpc.sln || goto :error @rem To be able to build, we also need to put grpc_csharp_ext to its normal location - xcopy /Y /I nativelibs\windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"} + xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"} %%DOTNET% pack --configuration Release Grpc.Core --output ..\..\..\artifacts || goto :error %%DOTNET% pack --configuration Release Grpc.Core.Testing --output ..\..\..\artifacts || goto :error diff --git a/templates/src/csharp/build_packages_dotnetcli.sh.template b/templates/src/csharp/build_packages_dotnetcli.sh.template index 374b236f93..65afec55c4 100755 --- a/templates/src/csharp/build_packages_dotnetcli.sh.template +++ b/templates/src/csharp/build_packages_dotnetcli.sh.template @@ -36,35 +36,19 @@ mkdir -p ../../artifacts/ - mkdir -p nativelibs/windows_x86 nativelibs/windows_x64 ${"\\"} - nativelibs/linux_x86 nativelibs/linux_x64 ${"\\"} - nativelibs/macosx_x86 nativelibs/macosx_x64 - - mkdir -p protoc_plugins/windows_x86 protoc_plugins/windows_x64 ${"\\"} - protoc_plugins/linux_x86 protoc_plugins/linux_x64 ${"\\"} - protoc_plugins/macosx_x86 protoc_plugins/macosx_x64 - - # Collect the artifacts built by the previous build step if running on Jenkins - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=windows/artifacts/* nativelibs/windows_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=windows/artifacts/* nativelibs/windows_x64 || true - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=linux/artifacts/* nativelibs/linux_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=linux/artifacts/* nativelibs/linux_x64 || true - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x64 || true + # Collect the artifacts built by the previous build step + mkdir -p nativelibs + cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true # Collect protoc artifacts built by the previous build step - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x64 || true - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x64 || true - cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x86 || true - cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x64 || true + mkdir -p protoc_plugins + cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true dotnet restore Grpc.sln # To be able to build, we also need to put grpc_csharp_ext to its normal location mkdir -p ../../libs/opt - cp nativelibs/linux_x64/libgrpc_csharp_ext.so ../../libs/opt + cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt dotnet pack --configuration Release Grpc.Core --output ../../../artifacts dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts -- cgit v1.2.3