diff options
author | 2016-05-02 13:45:41 -0700 | |
---|---|---|
committer | 2016-05-02 13:45:41 -0700 | |
commit | 3f2fad6c20125689419eca24977d15c2d3307a87 (patch) | |
tree | bad2f9b412472cbff31ab8a655ce2a7f7311cb6c /tools/run_tests | |
parent | 1dd74dd3783daa3ac427add91b3b81deb7758200 (diff) | |
parent | 8e4512ba482f03887f15ac7b978bffd8eb3b9840 (diff) |
Merge pull request #6371 from murgatroid99/ruby_tools_gem
Created grpc-tools ruby gem for distributing protoc and the plugin
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/build_package_ruby.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index 1a5b94348d..e44428bf7e 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -32,6 +32,8 @@ set -ex cd $(dirname $0)/../.. +base=$(pwd) + mkdir -p artifacts/ # All the ruby packages have been built in the artifact phase already @@ -41,3 +43,25 @@ cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows, # TODO: all the artifact builder configurations generate a grpc-VERSION.gem # source distribution package, and only one of them will end up # in the artifacts/ directory. They should be all equivalent though. + +for arch in {x86,x64}; do + case $arch in + x64) + ruby_arch=x86_64 + ;; + *) + ruby_arch=$arch + ;; + esac + for plat in {windows,linux,macos}; do + input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" + output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" + mkdir -p $output_dir + cp $input_dir/protoc* $output_dir/ + cp $input_dir/grpc_ruby_plugin* $output_dir/ + done +done + +cd $base/src/ruby/tools +gem build grpc-tools.gemspec +cp ./grpc-tools*.gem $base/artifacts/ |