Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the proto path so we only glob one version of protos. #185

Merged
merged 1 commit into from
Feb 1, 2019
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
3 changes: 2 additions & 1 deletion synthtool/gcp/gapic_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _generate_code(
if include_protos:
import shutil

source_dir = googleapis / config_path.parent
source_dir = googleapis / config_path.parent / version
proto_files = source_dir.glob("**/*.proto")
# By default, put the protos at the root in a folder named 'protos'.
# Specific languages can be cased here to put them in a more language
Expand All @@ -146,6 +146,7 @@ def _generate_code(
os.makedirs(proto_output_path, exist_ok=True)

for i in proto_files:
log.debug(f"Copy: {i} to {proto_output_path / i.name}")
shutil.copyfile(i, proto_output_path / i.name)
log.success(f"Placed proto files into {proto_output_path}.")

Expand Down