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 1515import time
1616import yaml
1717import requests
18+ import tempfile
1819
1920from aura import cli
2021
@@ -144,13 +145,28 @@ def find_build_config_file():
144145 """
145146 Finds the build config file to use, as it might be _topic_map.yml or _build_cfg.yml
146147 """
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
148165 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" ))
150167
151168 return config
152169
153-
154170def parse_build_config (config ):
155171 """
156172 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