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 @@ -1287,6 +1287,19 @@ def _update_changelog_for_library(
12871287 _write_text_file (changelog_dest , updated_content )
12881288
12891289
1290+ def _is_generated_library (repo : str ) -> bool :
1291+ """Determines if a library is generated or handwritten.
1292+
1293+ Args:
1294+ repo(str): This directory will contain all directories that make up a
1295+ library, the .librarian folder, and any global file declared in
1296+ the config.yaml.
1297+
1298+ Returns: True if the library is generated, False otherwise.
1299+ """
1300+ return Path (f"{ repo } /packages" ).exists ()
1301+
1302+
12901303def handle_release_init (
12911304 librarian : str = LIBRARIAN_DIR , repo : str = REPO_DIR , output : str = OUTPUT_DIR
12921305):
@@ -1315,7 +1328,7 @@ def handle_release_init(
13151328 librarian directory cannot be read.
13161329 """
13171330 try :
1318- is_generated = Path ( f" { repo } /packages" ). exists ( )
1331+ is_generated = _is_generated_library ( repo )
13191332
13201333 # Read a release-init-request.json file
13211334 request_data = _read_json_file (f"{ librarian } /{ RELEASE_INIT_REQUEST_FILE } " )
You can’t perform that action at this time.
0 commit comments