File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1334,6 +1334,19 @@ def _update_changelog_for_library(
13341334 _write_text_file (changelog_dest , updated_content )
13351335
13361336
1337+ def _is_generated_library (repo : str ) -> bool :
1338+ """Determines if a library is generated or handwritten.
1339+
1340+ Args:
1341+ repo(str): This directory will contain all directories that make up a
1342+ library, the .librarian folder, and any global file declared in
1343+ the config.yaml.
1344+
1345+ Returns: True if the library is generated, False otherwise.
1346+ """
1347+ return Path (f"{ repo } /packages" ).exists ()
1348+
1349+
13371350def handle_release_init (
13381351 librarian : str = LIBRARIAN_DIR , repo : str = REPO_DIR , output : str = OUTPUT_DIR
13391352):
@@ -1362,7 +1375,7 @@ def handle_release_init(
13621375 librarian directory cannot be read.
13631376 """
13641377 try :
1365- is_generated = Path ( f" { repo } /packages" ). exists ( )
1378+ is_generated = _is_generated_library ( repo )
13661379
13671380 # Read a release-init-request.json file
13681381 request_data = _read_json_file (f"{ librarian } /{ RELEASE_INIT_REQUEST_FILE } " )
You can’t perform that action at this time.
0 commit comments