diff options
author | David Garcia Quintas <dgq@google.com> | 2016-01-20 09:45:34 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-01-20 14:55:32 -0800 |
commit | e5af172eea5d5b97d72443520912f14f704209a7 (patch) | |
tree | 538f32331ee5e517117676fca896e5dae4a6636a /tools | |
parent | 5220a75912fe0cb2ddfe3ee34dd8a7023382d705 (diff) |
Updated scripts to use docker for clang-formatting
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/codegen/core/gen_load_balancing_proto.sh | 12 | ||||
-rwxr-xr-x | tools/distrib/check_nanopb_output.sh | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_load_balancing_proto.sh index 87c05f5fe8..2d902ab315 100755 --- a/tools/codegen/core/gen_load_balancing_proto.sh +++ b/tools/codegen/core/gen_load_balancing_proto.sh @@ -124,15 +124,7 @@ mv $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE mv $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" -docker run --rm=true \ - -v ${HOST_GIT_ROOT:-`pwd`}:/local-code \ - -t grpc_clang_format \ - clang-format-3.6 \ - -style="{BasedOnStyle: Google, Language: Cpp}" \ - -i "/local-code/src/core/proto/grpc/lb/v0/$PROTO_BASENAME.pb.c" && \ - clang-format-3.6 \ - -style="{BasedOnStyle: Google, Language: Cpp}" \ - -i "/local-code/src/core/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h" - +docker run -v $OUTPUT_DIR:/local -t grpc_clang_format \ + bash -c 'clang-format-3.6 -style="{BasedOnStyle: Google, Language: Cpp}" -i /local/load_balancer.pb.*' popd > /dev/null diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index 9831e09014..21179c606b 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -45,6 +45,9 @@ pip install protobuf==3.0.0b2 # change to root directory cd $(dirname $0)/../.. +# build clang-format docker image +docker build -t grpc_clang_format tools/dockerfile/grpc_clang_format + # install protoc version 3 pushd third_party/protobuf apt-get install -y autoconf automake libtool curl |