@@ -62,15 +62,15 @@ def new_contest() -> None:
6262 rights_owner = f"rights_owner: { rights_owner } \n " if rights_owner else ""
6363 title = title .replace ("_" , "-" )
6464
65- skeldir = config .TOOLS_ROOT / "skel/contest"
65+ skeldir = config .RESOURCES_ROOT / "skel/contest"
6666 log (f"Copying { skeldir } to { dirname } ." )
6767 copytree_and_substitute (
6868 skeldir , Path (dirname ), locals (), exist_ok = False , preserve_symlinks = False
6969 )
7070
7171
7272def get_skel_dir (target_dir : Path ) -> tuple [Path , bool ]:
73- skeldir = config .TOOLS_ROOT / "skel/problem"
73+ skeldir = config .RESOURCES_ROOT / "skel/problem"
7474 preserve_symlinks = False
7575 if (target_dir / "skel/problem" ).is_dir ():
7676 skeldir = target_dir / "skel/problem"
@@ -311,12 +311,12 @@ def problem_source_dir(problem: Problem) -> Path:
311311 return problem .path .absolute ().relative_to (git_root_path )
312312
313313 if config .args .latest_bt :
314- header_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/header_latest_bt.yaml" ).read_text ()
314+ header_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/header_latest_bt.yaml" ).read_text ()
315315 else :
316- header_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/header_docker_bt.yaml" ).read_text ()
316+ header_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/header_docker_bt.yaml" ).read_text ()
317317 print (header_yml )
318318
319- contest_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/contest.yaml" ).read_text ()
319+ contest_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/contest.yaml" ).read_text ()
320320 contest_path = Path ("." ).absolute ().relative_to (git_root_path )
321321 changes = "" .join (
322322 f" - { problem_source_dir (problem )} /{ pdf_type .path ().parent } /**/*\n "
@@ -329,7 +329,7 @@ def problem_source_dir(problem: Problem) -> Path:
329329 )
330330 )
331331
332- problem_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/problem.yaml" ).read_text ()
332+ problem_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/problem.yaml" ).read_text ()
333333 for problem_obj in problems :
334334 problem_path = problem_source_dir (problem_obj )
335335 problem = problem_obj .name
@@ -351,9 +351,9 @@ def create_forgejo_actions(contest: str, problems: list[Problem]) -> None:
351351 fatal (".git and ../.git not found after changing to contest directory." )
352352
353353 if config .args .latest_bt :
354- src = config .TOOLS_ROOT / "skel/forgejo_actions_latest_bt"
354+ src = config .RESOURCES_ROOT / "skel/forgejo_actions_latest_bt"
355355 else :
356- src = config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt"
356+ src = config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt"
357357
358358 if config .args .latest_bt :
359359 # Copy the 'setup' action:
@@ -403,7 +403,7 @@ def create_github_actions(contest: str, problems: list[Problem]) -> None:
403403
404404 # Copy the contest-level workflow.
405405 contest_workflow_source = (
406- config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt/contest.yaml"
406+ config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt/contest.yaml"
407407 ).read_text ()
408408 contest_workflow = substitute (
409409 contest_workflow_source , {"contest" : contest , "contest_path" : str (contest_path )}
@@ -417,7 +417,7 @@ def create_github_actions(contest: str, problems: list[Problem]) -> None:
417417
418418 # Copy the problem-level workflows.
419419 problem_workflow_source = (
420- config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt/problem.yaml"
420+ config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt/problem.yaml"
421421 ).read_text ()
422422 for problem_obj in problems :
423423 problem = problem_obj .name
0 commit comments