feat: distribute according to conf root
Some checks failed
build / build (push) Failing after 1s
build / build (pull_request) Failing after 0s

This commit is contained in:
李衍志523370910113 2025-02-23 21:43:49 +08:00
parent 979185252d
commit 7f24a77308
2 changed files with 3 additions and 2 deletions

View File

@ -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 file in files:
if file.endswith(".toml"):

View File

@ -9,6 +9,7 @@ import yaml
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 distribute_json
from joj3_config_generator.models import joj1, repo, task
from joj3_config_generator.utils.logger import logger
@ -65,5 +66,5 @@ def convert(
# distribution on json
# need a get folder path function
# distribute_json(folder_path, repo_obj, conf_root)
distribute_json(root.absolute(), repo_obj, root)
return result_dict