Skip to content

Commit

Permalink
chore(java): don't mess with poms for non-client library repos (#1211)
Browse files Browse the repository at this point in the history
Fixes #1210
  • Loading branch information
chingor13 authored Sep 10, 2021
1 parent 396d9b8 commit 6e5ea24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker/owlbot/java/src/fix-poms.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def _dependency_matches(node, group_id, artifact_id) -> bool:
)


def _is_cloud_client(proto_modules: List[module.Module], grpc_modules: List[module.Module]) -> bool:
return len(proto_modules) > 0 or len(grpc_modules) > 0


def update_cloud_pom(
filename: str, proto_modules: List[module.Module], grpc_modules: List[module.Module]
):
Expand Down Expand Up @@ -344,6 +348,10 @@ def main():
]
modules = [main_module] + grpc_modules + proto_modules

if not _is_cloud_client(proto_modules, grpc_modules):
print("no proto or grpc modules - probably not a cloud client")
return

if os.path.isfile(f"{artifact_id}/pom.xml"):
print("updating modules in cloud pom.xml")
update_cloud_pom(f"{artifact_id}/pom.xml", proto_modules, grpc_modules)
Expand Down

0 comments on commit 6e5ea24

Please sign in to comment.