File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 2222import time
2323import yaml
2424import requests
25+ import tempfile
2526
2627from aura import cli
2728
@@ -151,9 +152,25 @@ def find_build_config_file():
151152 """
152153 Finds the build config file to use, as it might be _topic_map.yml or _build_cfg.yml
153154 """
154- config = os .path .abspath (os .path .join (CLONE_DIR , "_topic_map.yml" ))
155+
156+ # updated 23rd Nov to support files in _topic_maps folder
157+
158+ # load everything from the _topic_maps folder
159+ file_list = os .listdir (os .path .join (CLONE_DIR , "_topic_maps" ))
160+
161+ # create a temp file combining all values from that folder
162+ # don't delete it immediately, and give it a suffix of swp which makes it ignored by git
163+ with tempfile .NamedTemporaryFile (dir = CLONE_DIR , delete = False , suffix = ".swp" ) as tmp :
164+ for f in file_list :
165+ with open (os .path .join (CLONE_DIR , "_topic_maps" , f ), "rb" ) as infile :
166+ tmp .write (infile .read ())
167+
168+ config = os .path .abspath (tmp .name )
169+ log .info (config )
170+
171+ # backup look for a single _topic_map in the cloned directory
155172 if not os .path .isfile (config ):
156- config = os .path .abspath (os .path .join (CLONE_DIR , "_build_cfg .yml" ))
173+ config = os .path .abspath (os .path .join (CLONE_DIR , "_topic_map .yml" ))
157174
158175 return config
159176
You can’t perform that action at this time.
0 commit comments