diff options
Diffstat (limited to 'src/hydrilla/builder/build.py')
-rw-r--r-- | src/hydrilla/builder/build.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py index 3503f7a..0044614 100644 --- a/src/hydrilla/builder/build.py +++ b/src/hydrilla/builder/build.py @@ -339,14 +339,13 @@ class Build: def write_package_files(self, dstpath: Path): """Write package files under 'dstpath' for distribution.""" - file_dir_path = (dstpath / 'file').resolve() + file_dir_path = (dstpath / 'file' / 'sha256').resolve() file_dir_path.mkdir(parents=True, exist_ok=True) for file_ref in self.files_by_path.values(): if file_ref.include_in_distribution: - file_name = f'sha256-{file_ref.contents_hash}' - with open(file_dir_path / file_name, 'wb') as output: - output.write(file_ref.contents) + file_path = file_dir_path / file_ref.contents_hash + file_path.write_bytes(file_ref.contents) source_dir_path = (dstpath / 'source').resolve() source_dir_path.mkdir(parents=True, exist_ok=True) |