Add well known protos to Node and Ruby tools packages

pull/6912/head
murgatroid99 9 years ago
parent efcaa4bc10
commit 43b6373b42
  1. 1
      src/node/tools/package.json
  2. 6
      tools/run_tests/build_package_node.sh
  3. 7
      tools/run_tests/build_package_ruby.sh

@ -34,6 +34,7 @@
"index.js",
"bin/protoc.js",
"bin/protoc_plugin.js",
"bin/google/protobuf",
"LICENSE"
],
"main": "index.js"

@ -58,6 +58,8 @@ tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\S+')
output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/v$tools_version
mkdir -p $output_dir
well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers )
for arch in {x86,x64}; do
case arch in
x86)
@ -83,6 +85,10 @@ for arch in {x86,x64}; do
input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts"
cp $input_dir/protoc* bin/
cp $input_dir/grpc_node_plugin* bin/
mkdir -p bin/google/protobuf
for proto in "${well_known_protos[@]}"; do
cp $base/third_party/protobuf/src/google/protobuf/$proto.proto bin/google/protobuf/
done
tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/
done
done

@ -40,6 +40,8 @@ mkdir -p artifacts/
# and we only collect them here to deliver them to the distribtest phase.
cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows,linux,macos}/artifacts/* artifacts/ || true
well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers )
# 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.
@ -56,9 +58,12 @@ for arch in {x86,x64}; do
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
mkdir -p $output_dir/google/protobuf
cp $input_dir/protoc* $output_dir/
cp $input_dir/grpc_ruby_plugin* $output_dir/
for proto in "${well_known_protos[@]}"; do
cp $base/third_party/protobuf/src/google/protobuf/$proto.proto $output_dir/google/protobuf/
done
done
done

Loading…
Cancel
Save