Skip to content

Commit

Permalink
Fixed same folder name colision bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DEADSEC-SECURITY committed Jul 27, 2023
1 parent d2c7a59 commit 54ee1f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aws_cdk_code_builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def __init__(self, project_path: Union[str, Path], work_dir: Union[str, Path],
if not self.project_path.is_dir():
raise ValueError('Project path needs to be a directory')

# Use function folder and parent folder names to avoid same function folder name colisions
project_name = self.project_path.parts[-1]
if base_path := self.project_path.parts[-2]:
project_name = f"{base_path}-{project_name}"

self._build_dir = self.work_dir.joinpath('.build')
self._project_build_dir = self._build_dir.joinpath(project_name)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
setup(
name='aws-cdk-code-builder',
packages=find_packages(),
version='1.2.3',
version='1.2.4',
description='A Library that extends the aws_lambda.Code.from_asset and allows for auto '
'packaging of the project',
long_description=README,
Expand Down

0 comments on commit 54ee1f7

Please sign in to comment.