Skip to content

Commit aa56717

Browse files
committed
Added function to copy assets to their respective place
1 parent 36ecf62 commit aa56717

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/cli/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from click import Command, Option
1010
from yaspin import yaspin # type: ignore
1111

12-
from ..core.copy_files import *
12+
from ..core.copy_files import copy_files # type: ignore
1313
from ..core.manage_json import read_json, write_json
1414
from ..core.manage_templates import template_to_file
1515
from ..utils.cli import clear, confirm

src/core/copy_files.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
from __future__ import annotations
22

3-
from pathlib import Path # type: ignore
3+
from pathlib import Path
4+
from shutil import copyfile
5+
6+
7+
def copy_files(path: Path, services: list[str]) -> None:
8+
for service in services:
9+
copyfile(Path(), path.joinpath(f"servers/{service}")) # Dockerfile
10+
copyfile(Path(), path.joinpath(f"servers/{service}")) # .dockerignore
11+
copyfile(Path(), path.joinpath(f"servers/{service}")) # run.sh
12+
copyfile(Path(), path) # README.md

0 commit comments

Comments
 (0)