Skip to content

Commit 586a5b3

Browse files
authored
Closed #30: Create directory during dependencies copying process (#34)
Resolved issue #30. If the destination directory doesn't exist, it will be created. Resolves: #30 Signed-off-by: Anton Kremenetsky <anton.kremenetsky@gmail.com>
1 parent 26836bd commit 586a5b3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

genesis_devtools/builder/dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def from_config(
7878
class HttpDependency(base.AbstractDependency):
7979
"""HTTP dependency item."""
8080

81-
CHUNK_SIZE = 32768
81+
CHUNK_SIZE = 65536
8282

8383
def __init__(self, endpoint: str, img_dest: str) -> None:
8484
super().__init__()

genesis_devtools/builder/packer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
}}
3434
provisioner "shell" {{
3535
inline = [
36+
"sudo mkdir -p {destination_dir}",
3637
"sudo mv {tmp_destination} {destination}",
3738
]
3839
}}
@@ -141,6 +142,7 @@ def pre_build(
141142
provisioners.append(
142143
file_provisioner_tmpl.format(
143144
source=dep.local_path,
145+
destination_dir=os.path.dirname(dep.img_dest),
144146
destination=dep.img_dest,
145147
tmp_destination=tmp_dest,
146148
)

0 commit comments

Comments
 (0)