@@ -99,20 +99,23 @@ def set_dependency_path(args):
9999 f .write ("" .join (x for x in lines ))
100100
101101
102- def find_meta_dirs (paths ):
102+ def find_meta_dirs (paths , exclude_dirs = None ):
103103 """
104104 Return a set of rose-metadata directories that can be found in the apps and
105105 core sources. Done by seaching for rose-meta.conf files. Records the parent
106106 directory of the current one, as rose-meta.conf files end up in HEAD/vnX.Y
107107 directories.
108108 """
109109
110- print ("[INFO] Finding rose metadata directories" )
110+
111+
112+ if exclude_dirs is None :
113+ exclude_dirs = []
111114
112115 dirs = set ()
113116 for path in paths :
117+ print ("[INFO] Finding rose metadata directories in" , path )
114118 for dirpath , dirnames , filenames in os .walk (path ):
115- exclude_dirs = [".svn" , "rose-stem" , "integration-test" ]
116119 dirnames [:] = [d for d in dirnames if d not in exclude_dirs ]
117120 if "rose-meta.conf" in filenames :
118121 dirs .add (os .path .dirname (dirpath ))
@@ -407,7 +410,14 @@ def main():
407410
408411 set_dependency_path (args )
409412
410- meta_dirs = find_meta_dirs ([args .apps , args .core ])
413+ # Find all metadata directories, excluing jules shared and lfric inputs as these have metadata but no macros.
414+ exclude_dirs = [".svn" , "rose-stem" , "integration-test" , "lfric-jules-shared" , "lfricinputs" ]
415+ meta_dirs = find_meta_dirs ([args .apps , args .core ], exclude_dirs )
416+
417+ # Find JULES shared metadata directories and combine with all other metadirs for where they are handled differently
418+ jules_meta_path = os .path .join (args .apps , "interfaces" , "jules_interface" , "rose-meta" , "lfric-jules-shared" )
419+ jules_shared_meta_dirs = find_meta_dirs ([jules_meta_path ])
420+ meta_dirs_plus_jules = meta_dirs .union (jules_shared_meta_dirs )
411421
412422 update_version_number (args )
413423
@@ -426,7 +436,7 @@ def main():
426436 )
427437 print ("\n [INFO] Successfully upgraded apps" )
428438
429- copy_head_meta (meta_dirs , args )
439+ copy_head_meta (meta_dirs_plus_jules , args )
430440
431441 update_meta_import_path (meta_dirs , args )
432442
0 commit comments