diff --git a/aws_cdk_code_builder/__init__.py b/aws_cdk_code_builder/__init__.py index ac68bab..ff0ecfb 100644 --- a/aws_cdk_code_builder/__init__.py +++ b/aws_cdk_code_builder/__init__.py @@ -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) diff --git a/setup.py b/setup.py index 498c151..69cddbd 100644 --- a/setup.py +++ b/setup.py @@ -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,