Skip to content

Commit

Permalink
add sh scripts to package data
Browse files Browse the repository at this point in the history
  • Loading branch information
rpmcginty committed Jul 11, 2024
1 parent 31ffa7e commit 9f11bd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion src/aibs_informatics_cdk_lib/cicd/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
Optional,
Sequence,
Tuple,
Type,
TypeVar,
Union,
cast,
)
from importlib.resources import files

import aws_cdk as cdk
import constructs
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f11bd5

Please sign in to comment.