@@ -63,15 +63,15 @@ def new_contest() -> None:
6363 rights_owner = f"rights_owner: { rights_owner } \n " if rights_owner else ""
6464 title = title .replace ("_" , "-" )
6565
66- skeldir = config .TOOLS_ROOT / "skel/contest"
66+ skeldir = config .RESOURCES_ROOT / "skel/contest"
6767 log (f"Copying { skeldir } to { dirname } ." )
6868 copytree_and_substitute (
6969 skeldir , Path (dirname ), locals (), exist_ok = False , preserve_symlinks = False
7070 )
7171
7272
7373def get_skel_dir (target_dir : Path ) -> tuple [Path , bool ]:
74- skeldir = config .TOOLS_ROOT / "skel/problem"
74+ skeldir = config .RESOURCES_ROOT / "skel/problem"
7575 preserve_symlinks = False
7676 if (target_dir / "skel/problem" ).is_dir ():
7777 skeldir = target_dir / "skel/problem"
@@ -303,12 +303,12 @@ def problem_source_dir(problem: Problem) -> Path:
303303 return problem .path .absolute ().relative_to (git_root_path )
304304
305305 if config .args .latest_bt :
306- header_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/header_latest_bt.yaml" ).read_text ()
306+ header_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/header_latest_bt.yaml" ).read_text ()
307307 else :
308- header_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/header_docker_bt.yaml" ).read_text ()
308+ header_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/header_docker_bt.yaml" ).read_text ()
309309 print (header_yml )
310310
311- contest_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/contest.yaml" ).read_text ()
311+ contest_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/contest.yaml" ).read_text ()
312312 contest_path = Path ("." ).absolute ().relative_to (git_root_path )
313313 changes = "" .join (
314314 f" - { problem_source_dir (problem )} /{ pdf_type .path ().parent } /**/*\n "
@@ -321,7 +321,7 @@ def problem_source_dir(problem: Problem) -> Path:
321321 )
322322 )
323323
324- problem_yml = (config .TOOLS_ROOT / "skel/gitlab_ci/problem.yaml" ).read_text ()
324+ problem_yml = (config .RESOURCES_ROOT / "skel/gitlab_ci/problem.yaml" ).read_text ()
325325 for problem_obj in problems :
326326 problem_path = problem_source_dir (problem_obj )
327327 problem = problem_obj .name
@@ -343,9 +343,9 @@ def create_forgejo_actions(contest: str, problems: list[Problem]) -> None:
343343 fatal (".git and ../.git not found after changing to contest directory." )
344344
345345 if config .args .latest_bt :
346- src = config .TOOLS_ROOT / "skel/forgejo_actions_latest_bt"
346+ src = config .RESOURCES_ROOT / "skel/forgejo_actions_latest_bt"
347347 else :
348- src = config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt"
348+ src = config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt"
349349
350350 if config .args .latest_bt :
351351 # Copy the 'setup' action:
@@ -395,7 +395,7 @@ def create_github_actions(contest: str, problems: list[Problem]) -> None:
395395
396396 # Copy the contest-level workflow.
397397 contest_workflow_source = (
398- config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt/contest.yaml"
398+ config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt/contest.yaml"
399399 ).read_text ()
400400 contest_workflow = substitute (
401401 contest_workflow_source , {"contest" : contest , "contest_path" : str (contest_path )}
@@ -409,7 +409,7 @@ def create_github_actions(contest: str, problems: list[Problem]) -> None:
409409
410410 # Copy the problem-level workflows.
411411 problem_workflow_source = (
412- config .TOOLS_ROOT / "skel/forgejo_actions_docker_bt/problem.yaml"
412+ config .RESOURCES_ROOT / "skel/forgejo_actions_docker_bt/problem.yaml"
413413 ).read_text ()
414414 for problem_obj in problems :
415415 problem = problem_obj .name
0 commit comments