File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -329,24 +329,21 @@ def create_current_resolved_artifacts_map(original_artifacts):
329329 )
330330 return result
331331
332- def copy_previous_version_or_create_new_empty_file (file_path , output_dir_path ):
332+ def copy_previous_version_or_create_new_file_if_missing (file_path , output_dir ):
333333 if file_path .exists ():
334334 return
335335
336- existing_files = sorted (output_dir_path .glob ('scala_*.bzl' ))
336+ existing_files = sorted (output_dir .glob ('scala_*.bzl' ))
337337 if existing_files :
338338 shutil .copyfile (existing_files [- 1 ], file_path )
339339 return
340340
341- # Create an empty dictionary and start from scratch.
342341 with open (file_path , 'w' , encoding = 'utf-8' ) as f :
343342 f .write ('{}\n ' )
344343
345- def create_or_update_repository_file (version , output_dir_path ):
346- file = output_dir_path / f'scala_{ "_" .join (version .split ("." )[:2 ])} .bzl'
347-
348- if not file .exists ():
349- copy_previous_version_or_create_new_empty_file (file , output_dir_path )
344+ def create_or_update_repository_file (version , output_dir ):
345+ file = output_dir / f'scala_{ "_" .join (version .split ("." )[:2 ])} .bzl'
346+ copy_previous_version_or_create_new_file_if_missing (file , output_dir )
350347
351348 print ('\n UPDATING:' , file )
352349 with file .open ('r' , encoding = 'utf-8' ) as data :
You can’t perform that action at this time.
0 commit comments