Skip to content

Commit

Permalink
Handle custom build root.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed May 10, 2024
1 parent 59a43f2 commit f057965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multiversx_sdk_rust_contract_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def ensure_distinct_contract_names(contracts_folders: List[Path]):

def copy_project_folder_to_build_folder(project_folder: Path, build_root_folder: Path):
shutil.rmtree(build_root_folder, ignore_errors=True)
build_root_folder.mkdir()
build_root_folder.mkdir(parents=True, exist_ok=True)

shutil.copytree(
project_folder, build_root_folder,
Expand Down
1 change: 1 addition & 0 deletions multiversx_sdk_rust_contract_builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def main(cli_args: List[str]):
shutil.rmtree(HARDCODED_UNWRAP_FOLDER, ignore_errors=True)
packaged = PackagedSourceCode.from_file(packaged_src_path)
packaged.unwrap_to_filesystem(HARDCODED_UNWRAP_FOLDER)
build_root = packaged.metadata.build_options.get("buildRootFolder", build_root)

metadata = BuildMetadata.from_env()

Expand Down

0 comments on commit f057965

Please sign in to comment.