Simplify the check buildifier script logic

pull/21460/head
Lidi Zheng 5 years ago
parent d5d6914751
commit e27782c1c5
  1. 2
      tools/distrib/buildifier_format_code.sh
  2. 9
      tools/run_tests/sanity/check_buildifier.sh

@ -1,4 +1,4 @@
#! /bin/bash -ex
#! /bin/bash -e
# Copyright 2019 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#! /bin/bash -x
#! /bin/bash
# Copyright 2019 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -13,13 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# The script to sanitize Bazel files
# The script to check if Bazel files needs to be formatted.
GIT_ROOT="$(dirname "$0")/../../.."
TMP_ROOT="/tmp/buildifier_grpc"
rm -rf "${TMP_ROOT}"
git clone -- "$GIT_ROOT" "$TMP_ROOT"
buildifier -r -v -mode=diff $TMP_ROOT
"$GIT_ROOT/tools/distrib/buildifier_format_code.sh" -mode=diff
result=$?
if [[ ${result} != 0 ]]; then

Loading…
Cancel
Save