Skip to content

Commit 047f302

Browse files
authored
fix(Build): use relative path for single bot file/module (#293)
1 parent 26a383b commit 047f302

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

silverback/_build_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,9 @@ def generate_containerfiles(path: Path, sdk_version: str = "stable"):
9393

9494
if path.is_dir() and path.name == "bots":
9595
for bot in path.glob("*.py"):
96-
bot = bot.relative_to(Path.cwd())
9796
(Path.cwd() / IMAGES_FOLDER_NAME / f"Dockerfile.{bot.stem}").write_text(
9897
containerfile_template(
99-
bot,
98+
bot.relative_to(Path.cwd()),
10099
sdk_version=sdk_version,
101100
requirements_txt_fname=requirements_txt_fname,
102101
has_pyproject_toml=has_pyproject_toml,
@@ -110,7 +109,7 @@ def generate_containerfiles(path: Path, sdk_version: str = "stable"):
110109
else:
111110
(Path.cwd() / IMAGES_FOLDER_NAME / "Dockerfile.bot").write_text(
112111
containerfile_template(
113-
path,
112+
path.relative_to(Path.cwd()),
114113
sdk_version=sdk_version,
115114
requirements_txt_fname=requirements_txt_fname,
116115
has_pyproject_toml=has_pyproject_toml,

0 commit comments

Comments
 (0)