|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
|
|
|
|
|
set -ex |
|
|
|
|
|
|
|
|
|
cd $(dirname $0)/../../.. |
|
|
|
|
cd "$(dirname "$0")/../../.." |
|
|
|
|
|
|
|
|
|
base=$(pwd) |
|
|
|
|
|
|
|
|
@ -23,7 +23,7 @@ mkdir -p artifacts/ |
|
|
|
|
|
|
|
|
|
# All the ruby packages have been built in the artifact phase already |
|
|
|
|
# and we only collect them here to deliver them to the distribtest phase. |
|
|
|
|
cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/ruby_native_gem_*/* artifacts/ || true |
|
|
|
|
cp -r "$EXTERNAL_GIT_ROOT"/platform={windows,linux,macos}/artifacts/ruby_native_gem_*/* artifacts/ || true |
|
|
|
|
|
|
|
|
|
well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers ) |
|
|
|
|
|
|
|
|
@ -43,16 +43,16 @@ for arch in {x86,x64}; do |
|
|
|
|
for plat in {windows,linux,macos}; do |
|
|
|
|
input_dir="$EXTERNAL_GIT_ROOT/platform=${plat}/artifacts/protoc_${plat}_${arch}" |
|
|
|
|
output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" |
|
|
|
|
mkdir -p $output_dir/google/protobuf |
|
|
|
|
mkdir -p $output_dir/google/protobuf/compiler # needed for plugin.proto |
|
|
|
|
cp $input_dir/protoc* $output_dir/ |
|
|
|
|
cp $input_dir/grpc_ruby_plugin* $output_dir/ |
|
|
|
|
mkdir -p "$output_dir"/google/protobuf |
|
|
|
|
mkdir -p "$output_dir"/google/protobuf/compiler # needed for plugin.proto |
|
|
|
|
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/$proto.proto |
|
|
|
|
cp "$base/third_party/protobuf/src/google/protobuf/$proto.proto" "$output_dir/google/protobuf/$proto.proto" |
|
|
|
|
done |
|
|
|
|
done |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
cd $base/src/ruby/tools |
|
|
|
|
cd "$base/src/ruby/tools" |
|
|
|
|
gem build grpc-tools.gemspec |
|
|
|
|
cp ./grpc-tools*.gem $base/artifacts/ |
|
|
|
|
cp ./grpc-tools*.gem "$base/artifacts/" |
|
|
|
|