@@ -99,20 +99,18 @@ def set_dependency_path(args):
99
99
f .write ("" .join (x for x in lines ))
100
100
101
101
102
- def find_meta_dirs (paths ):
102
+ def find_meta_dirs (paths , exclude_dirs = () ):
103
103
"""
104
104
Return a set of rose-metadata directories that can be found in the apps and
105
105
core sources. Done by seaching for rose-meta.conf files. Records the parent
106
106
directory of the current one, as rose-meta.conf files end up in HEAD/vnX.Y
107
107
directories.
108
108
"""
109
109
110
- print ("[INFO] Finding rose metadata directories" )
111
-
112
110
dirs = set ()
113
111
for path in paths :
112
+ print ("[INFO] Finding rose metadata directories in" , path )
114
113
for dirpath , dirnames , filenames in os .walk (path ):
115
- exclude_dirs = [".svn" , "rose-stem" , "integration-test" ]
116
114
dirnames [:] = [d for d in dirnames if d not in exclude_dirs ]
117
115
if "rose-meta.conf" in filenames :
118
116
dirs .add (os .path .dirname (dirpath ))
@@ -407,7 +405,22 @@ def main():
407
405
408
406
set_dependency_path (args )
409
407
410
- meta_dirs = find_meta_dirs ([args .apps , args .core ])
408
+ # Find all metadata directories, excluing jules shared and lfric inputs as these have metadata but no macros.
409
+ exclude_dirs = (
410
+ ".svn" ,
411
+ "rose-stem" ,
412
+ "integration-test" ,
413
+ "lfric-jules-shared" ,
414
+ "lfricinputs" ,
415
+ )
416
+ meta_dirs = find_meta_dirs ([args .apps , args .core ], exclude_dirs )
417
+
418
+ # Find JULES shared metadata directories and combine with all other metadirs for where they are handled differently
419
+ jules_meta_path = os .path .join (
420
+ args .apps , "interfaces" , "jules_interface" , "rose-meta" , "lfric-jules-shared"
421
+ )
422
+ jules_shared_meta_dirs = find_meta_dirs ([jules_meta_path ])
423
+ meta_dirs_plus_jules = meta_dirs .union (jules_shared_meta_dirs )
411
424
412
425
update_version_number (args )
413
426
@@ -426,7 +439,7 @@ def main():
426
439
)
427
440
print ("\n [INFO] Successfully upgraded apps" )
428
441
429
- copy_head_meta (meta_dirs , args )
442
+ copy_head_meta (meta_dirs_plus_jules , args )
430
443
431
444
update_meta_import_path (meta_dirs , args )
432
445
0 commit comments