Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/reformat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ go_module_name=$($go list -m)

# Go dependencies
find bazel-bin/ -path "*${go_module_name}*" -name '*.pb.go' -delete || true
bazel build $(bazel query --output=label 'kind("go_proto_library", //...)') || true
bazel build --output_groups=go_generated_srcs --remote_download_regex='.*\.pb\.go$' $(bazel query --output=label 'kind("go_proto_library", //...)') || true
find bazel-bin/ -path "*${go_module_name}*" -name '*.pb.go' | while read f; do
cat "$f" > $(echo "$f" | sed -e "s|.*/${go_module_name}/||")
done
Expand All @@ -59,7 +59,7 @@ find . -name '*.proto' -exec "$clang_format" -i {} +

# Generated .pb.go files
find bazel-bin/ -path "*${go_module_name}*" -name '*.pb.go' -delete || true
bazel build --output_groups=go_generated_srcs $(bazel query --output=label 'kind("go_proto_library", //...)')
bazel build --output_groups=go_generated_srcs --remote_download_regex='.*\.pb\.go$' $(bazel query --output=label 'kind("go_proto_library", //...)')
find bazel-bin/ -path "*${go_module_name}*" -name '*.pb.go' | while read f; do
cat $f > $(echo $f | sed -e "s|.*/${go_module_name}/||")
done
Expand Down
Loading