Skip to content

Commit 1058894

Browse files
committed
chore(librarian): Create package changelog if not present
1 parent 2da5c2a commit 1058894

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.generator/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,12 @@ def handle_configure(
290290
)
291291
prepared_config = _prepare_new_library_config(new_library_config)
292292

293-
# Create a `CHANGELOG.md` and `docs/CHANGELOG.md` file for the new library
293+
is_mono_repo = _is_mono_repo(input)
294294
library_id = _get_library_id(prepared_config)
295-
_create_new_changelog_for_library(library_id, output)
295+
path_to_library = f"packages/{library_id}" if is_mono_repo else "."
296+
if not Path(f"{repo}/{path_to_library}").exists():
297+
# Create a `CHANGELOG.md` and `docs/CHANGELOG.md` file for the new library
298+
_create_new_changelog_for_library(library_id, output)
296299

297300
# Write the new library configuration to configure-response.json.
298301
_write_json_file(f"{librarian}/configure-response.json", prepared_config)

0 commit comments

Comments
 (0)