feat: distribute according to conf root
This commit is contained in:
parent
979185252d
commit
7f24a77308
|
@ -75,7 +75,7 @@ def convert_joj1(joj1_conf: joj1.Config) -> task.Config:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def distribute_json(folder_path: str, repo_obj: Any, conf_root: Path) -> None:
|
def distribute_json(folder_path: Path, repo_obj: Any, conf_root: Path) -> None:
|
||||||
for root, _, files in os.walk(folder_path):
|
for root, _, files in os.walk(folder_path):
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.endswith(".toml"):
|
if file.endswith(".toml"):
|
||||||
|
|
|
@ -9,6 +9,7 @@ import yaml
|
||||||
|
|
||||||
from joj3_config_generator.convert import convert as convert_conf
|
from joj3_config_generator.convert import convert as convert_conf
|
||||||
from joj3_config_generator.convert import convert_joj1 as convert_joj1_conf
|
from joj3_config_generator.convert import convert_joj1 as convert_joj1_conf
|
||||||
|
from joj3_config_generator.convert import distribute_json
|
||||||
from joj3_config_generator.models import joj1, repo, task
|
from joj3_config_generator.models import joj1, repo, task
|
||||||
from joj3_config_generator.utils.logger import logger
|
from joj3_config_generator.utils.logger import logger
|
||||||
|
|
||||||
|
@ -65,5 +66,5 @@ def convert(
|
||||||
|
|
||||||
# distribution on json
|
# distribution on json
|
||||||
# need a get folder path function
|
# need a get folder path function
|
||||||
# distribute_json(folder_path, repo_obj, conf_root)
|
distribute_json(root.absolute(), repo_obj, root)
|
||||||
return result_dict
|
return result_dict
|
||||||
|
|
Loading…
Reference in New Issue
Block a user