From a6f831b58a16ae399d679dac2fedc950e8089130 Mon Sep 17 00:00:00 2001 From: Corentin Musard Date: Fri, 5 Apr 2024 11:51:07 +0200 Subject: [PATCH] Update README.md --- README.md | 4 ++++ copy_protobuf.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c384bf6..584c869 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ # Tilebox Go Library + +## Copy protobuf + +To copy the protobuf files from the `core` repo to this repo, you can use `copy_protobuf.py` script. diff --git a/copy_protobuf.py b/copy_protobuf.py index a3f9915..3fea1bb 100644 --- a/copy_protobuf.py +++ b/copy_protobuf.py @@ -46,11 +46,11 @@ def copy_module(core_repo: Path, clients_repo: Path, service_folder: str, packag search_path = core_repo / service_folder / "protogen" / "go" / package / "v1" for file in search_path.glob(f"{module}*"): if file.is_dir(): - for subfile in file.glob("*"): + for subfile in file.glob(f"{module}*"): target_file = target_path / file.name / subfile.name target_file.parent.mkdir(parents=True, exist_ok=True) target_file.write_text(fix_imports(subfile.read_text())) - print(f"A Copied and fixed file: {target_file}") + print(f"Copied and fixed file: {target_file}") continue target_file = target_path / file.name