diff --git a/cfbs/build.py b/cfbs/build.py index 9b8ac196..f81771ee 100644 --- a/cfbs/build.py +++ b/cfbs/build.py @@ -1,5 +1,6 @@ import os import logging as log +import shutil from typing import List, Tuple from cfbs.utils import ( canonify, @@ -260,7 +261,7 @@ def _perform_build_step(module, step, max_length): write_json(path, merged) -def perform_build_steps(config) -> int: +def perform_build(config) -> int: if not config.get("build"): user_error("No 'build' key found in the configuration") @@ -298,6 +299,8 @@ def perform_build_steps(config) -> int: for module in config.get("build", []): for step in module["steps"]: _perform_build_step(module, step, module_name_length) + assert os.path.isdir("./out/masterfiles/") + shutil.copyfile("./cfbs.json", "./out/masterfiles/cfbs.json") if os.path.isfile("out/masterfiles/def.json"): pretty_file("out/masterfiles/def.json") print("") diff --git a/cfbs/commands.py b/cfbs/commands.py index 9b3535d6..f405934b 100644 --- a/cfbs/commands.py +++ b/cfbs/commands.py @@ -41,7 +41,7 @@ ) from cfbs.build import ( init_out_folder, - perform_build_steps, + perform_build, ) from cfbs.cfbs_config import CFBSConfig, CFBSReturnWithoutCommit from cfbs.validate import validate_config @@ -803,7 +803,7 @@ def build_command(ignore_versions=False) -> int: # so we try building anyway and don't return error(s) init_out_folder() _download_dependencies(config, prefer_offline=True, ignore_versions=ignore_versions) - r = perform_build_steps(config) + r = perform_build(config) return r