Skip to content

Commit 849778d

Browse files
committed
chore(librarian): fix generation for google-cloud-common
1 parent 98aa464 commit 849778d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.generator/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,12 @@ def _get_staging_child_directory(api_path: str, is_proto_only_library: bool) ->
694694
version_candidate = api_path.split("/")[-1]
695695
if version_candidate.startswith("v") and not is_proto_only_library:
696696
return version_candidate
697-
else:
698-
# Fallback for non-'v' version segment
697+
elif is_proto_only_library:
698+
# Fallback for non-'v' version segment for proto-only library
699699
return f"{os.path.basename(api_path)}-py/{api_path}"
700+
else:
701+
# Fallback for non-'v' version segment for GAPIC
702+
return f"{os.path.basename(api_path)}-py"
700703

701704

702705
def _stage_proto_only_library(

.librarian/state.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,7 @@ libraries:
15691569
- scripts/client-post-processing
15701570
- samples/snippets/README.rst
15711571
- tests/system
1572+
- tests/unit/gapic/common/test_common.py
15721573
remove_regex:
15731574
- packages/google-cloud-common
15741575
tag_format: '{id}-v{version}'

0 commit comments

Comments
 (0)