Skip to content

Commit f7638a6

Browse files
authored
chore: polish state.yaml (#14299)
This PR incudes the following changes: - Update `scripts/configure_state_yaml/configure_state_yaml.py` to reflect the change in #14297 - Add `tag_format` as per https://github.com/googleapis/librarian/blob/main/doc/language-onboarding.md
1 parent 31b4bf8 commit f7638a6

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.librarian/state.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ libraries:
1111
- packages/google-cloud-language
1212
preserve_regex:
1313
- .OwlBot.yaml
14-
- CHANGELOG.md
14+
- packages/google-cloud-language/CHANGELOG.md
1515
- docs/CHANGELOG.md
1616
- docs/README.rst
1717
- samples/README.txt
@@ -20,4 +20,5 @@ libraries:
2020
- samples/generated_samples/snippet_metadata_
2121
- scripts/client-post-processing
2222
remove_regex:
23-
- ^packages/google-cloud-language
23+
- packages/google-cloud-language
24+
tag_format: '{id}-v{version}'

scripts/configure_state_yaml/configure_state_yaml.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def configure_state_yaml() -> None:
4444
with open(PACKAGES_TO_ONBOARD_YAML, "r") as packages_to_onboard_yaml_file:
4545
packages_to_onboard = yaml.safe_load(packages_to_onboard_yaml_file)
4646

47-
state_dict["image"] = "us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-dev/python-librarian-generator:latest"
47+
state_dict[
48+
"image"
49+
] = "us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-dev/python-librarian-generator:latest"
4850
state_dict["libraries"] = []
4951
for package_name in packages_to_onboard["packages_to_onboard"]:
5052
package_path = Path(PACKAGES_DIR / package_name).resolve()
@@ -65,10 +67,11 @@ def configure_state_yaml() -> None:
6567
"version": release_please_manifest[f"packages/{package_name}"],
6668
"last_generated_commit": "97a83d76a09a7f6dcab43675c87bdfeb5bcf1cb5",
6769
"apis": api_paths,
68-
"source_roots": [f"^packages/{package_path.name}"],
70+
"source_roots": [f"packages/{package_path.name}"],
6971
"preserve_regex": [
7072
".OwlBot.yaml",
71-
"CHANGELOG.md",
73+
# Use the full path to avoid ambiguity with the root CHANGELOG.md
74+
f"packages/{package_path.name}/CHANGELOG.md",
7275
"docs/CHANGELOG.md",
7376
"docs/README.rst",
7477
"samples/README.txt",
@@ -77,7 +80,8 @@ def configure_state_yaml() -> None:
7780
"samples/generated_samples/snippet_metadata_",
7881
"scripts/client-post-processing",
7982
],
80-
"remove_regex": [f"^packages/{package_path.name}"],
83+
"remove_regex": [f"packages/{package_path.name}"],
84+
"tag_format": "{id}-v{version}",
8185
}
8286
)
8387

0 commit comments

Comments
 (0)