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 22
22
import time
23
23
import yaml
24
24
import requests
25
+ import tempfile
25
26
26
27
from aura import cli
27
28
@@ -151,9 +152,25 @@ def find_build_config_file():
151
152
"""
152
153
Finds the build config file to use, as it might be _topic_map.yml or _build_cfg.yml
153
154
"""
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
155
172
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" ))
157
174
158
175
return config
159
176
You can’t perform that action at this time.
0 commit comments