Skip to content

Commit 71f474f

Browse files
committed
build all but some folders
1 parent 140b80f commit 71f474f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

agentstack/deploy.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ def deploy():
2323

2424
project_id = get_project_id()
2525
pyproject = load_pyproject()
26-
files = list(Path('.').rglob('*.py'))
26+
27+
def should_skip_dir(path: Path) -> bool:
28+
skip_dirs = {'.venv', '__pycache__', '.git', 'build', 'dist'}
29+
return path.name in skip_dirs
30+
31+
files = []
32+
for path in Path('.').iterdir():
33+
if path.is_dir():
34+
if should_skip_dir(path):
35+
continue
36+
files.extend(p for p in path.rglob('*.py'))
37+
elif path.suffix == '.py':
38+
files.append(path)
2739

2840
with tempfile.NamedTemporaryFile(suffix='.zip') as tmp:
2941
with zipfile.ZipFile(tmp.name, 'w') as zf:

0 commit comments

Comments
 (0)