diff --git a/pyproject.toml b/pyproject.toml index 7cf1f16..409b49a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ version = {attr = "aibs_informatics_cdk_lib._version.__version__"} [tool.setuptools.package-data] "*" = [ 'py.typed', - 'src/aibs_informatics_cdk_lib/cicd/pipeline/scripts/cicd-release.sh', + '*.sh', ] [tool.setuptools.packages.find] diff --git a/src/aibs_informatics_cdk_lib/cicd/pipeline/base.py b/src/aibs_informatics_cdk_lib/cicd/pipeline/base.py index ea1b4d7..e80400c 100644 --- a/src/aibs_informatics_cdk_lib/cicd/pipeline/base.py +++ b/src/aibs_informatics_cdk_lib/cicd/pipeline/base.py @@ -11,11 +11,11 @@ Optional, Sequence, Tuple, - Type, TypeVar, Union, cast, ) +from importlib.resources import files import aws_cdk as cdk import constructs @@ -361,6 +361,7 @@ def add_promotion_stage(self, pipeline: pipelines.CodePipeline): # 1. Read the release script file # 2. Base64 encode the file # 3. Decode the base64 encoded file and write it to the release script path + # TODO: i think importlib f"echo {base64.b64encode((Path(__file__).parent / 'scripts' / 'cicd-release.sh').read_text().encode()).decode()} | base64 --decode > $RELEASE_SCRIPT_PATH" ), # Run the release script