mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Fix oss.py script
- Adds newline fix from release branch - Adds transformation for MessageLite from google3 to open source Change-Id: Ie6c3f5263417fbbccc67835eb22fbe568a249125
This commit is contained in:
+4
-2
@@ -88,6 +88,7 @@ def post_process_oss_files(path, args):
|
||||
else:
|
||||
top_dirs = ["cpp", "proto"]
|
||||
transforms = (
|
||||
("::google3_proto_compat::MessageLite", "::google::protobuf::MessageLite"),
|
||||
("third_party/webrtc/files/stable/", ""),
|
||||
("webrtc/files/stable/", ""),
|
||||
("third_party/", ""),
|
||||
@@ -154,8 +155,9 @@ def post_process_oss_files(path, args):
|
||||
continue
|
||||
|
||||
if add_proto_lite_runtime and line.startswith("option "):
|
||||
lines.append("option optimize_for = LITE_RUNTIME;")
|
||||
modified = True
|
||||
if not line.startswith("option optimize_for = LITE_RUNTIME"):
|
||||
lines.append("option optimize_for = LITE_RUNTIME;\n")
|
||||
modified = True
|
||||
# LITE_RUNTIME should be added only once per file.
|
||||
add_proto_lite_runtime = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user