File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 15
15
import time
16
16
import yaml
17
17
import requests
18
+ import tempfile
18
19
19
20
from aura import cli
20
21
@@ -144,13 +145,28 @@ def find_build_config_file():
144
145
"""
145
146
Finds the build config file to use, as it might be _topic_map.yml or _build_cfg.yml
146
147
"""
147
- config = os .path .abspath (os .path .join (CLONE_DIR , "_topic_map.yml" ))
148
+
149
+ # updated 23rd Nov to support files in _topic_maps folder
150
+
151
+ # load everything from the _topic_maps folder
152
+ file_list = os .listdir (os .path .join (CLONE_DIR , "_topic_maps" ))
153
+
154
+ # create a temp file combining all values from that folder
155
+ # don't delete it immediately, and give it a suffix of swp which makes it ignored by git
156
+ with tempfile .NamedTemporaryFile (dir = CLONE_DIR , delete = False , suffix = ".swp" ) as tmp :
157
+ for f in file_list :
158
+ with open (os .path .join (CLONE_DIR , "_topic_maps" , f ), "rb" ) as infile :
159
+ tmp .write (infile .read ())
160
+
161
+ config = os .path .abspath (tmp .name )
162
+ log .info (config )
163
+
164
+ # backup look for a single _topic_map in the cloned directory
148
165
if not os .path .isfile (config ):
149
- config = os .path .abspath (os .path .join (CLONE_DIR , "_build_cfg .yml" ))
166
+ config = os .path .abspath (os .path .join (CLONE_DIR , "_topic_map .yml" ))
150
167
151
168
return config
152
169
153
-
154
170
def parse_build_config (config ):
155
171
"""
156
172
Parses the build config and returns a tree based structure for the config.
You can’t perform that action at this time.
0 commit comments