Merge pull request #19782 from veblush/protoyaml

Avoid copybara import error
pull/19785/head
Esun Kim 5 years ago committed by GitHub
commit c6f61f1d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/proto/gen_build_yaml.py

@ -15,6 +15,7 @@
"""Generates the appropriate build.json data for all the proto files."""
from __future__ import print_function
import yaml
import collections
import os
@ -36,6 +37,10 @@ def update_deps(key, proto_filename, deps, deps_external, is_trans, visited):
deps_external[key] = []
deps_external[key].append(imp_proto[:-6])
continue
# In case that the path is changed by copybara,
# revert the change to avoid file error.
if imp_proto.startswith('third_party/grpc'):
imp_proto = imp_proto[17:]
if key not in deps: deps[key] = []
deps[key].append(imp_proto[:-6])
if is_trans:
@ -66,7 +71,7 @@ def main():
'proto_transitive_external_deps': deps_external_trans
}
print yaml.dump(json)
print(yaml.dump(json))
if __name__ == '__main__':
main()

Loading…
Cancel
Save